1 #ifndef RecoVertex_PixelVertexFinding_plugins_alpaka_splitVertices_h 2 #define RecoVertex_PixelVertexFinding_plugins_alpaka_splitVertices_h 8 #include <alpaka/alpaka.hpp> 27 auto&
it = alpaka::declareSharedVar<uint32_t[MAXTK], __COUNTER__>(acc);
28 auto&
zz = alpaka::declareSharedVar<float[MAXTK], __COUNTER__>(acc);
29 auto&
newV = alpaka::declareSharedVar<uint8_t[MAXTK], __COUNTER__>(acc);
30 auto&
ww = alpaka::declareSharedVar<float[MAXTK], __COUNTER__>(acc);
31 auto&
nq = alpaka::declareSharedVar<uint32_t, __COUNTER__>(acc);
50 alpaka::syncBlockThreads(acc);
64 auto& znew = alpaka::declareSharedVar<float[2], __COUNTER__>(acc);
65 auto& wnew = alpaka::declareSharedVar<float[2], __COUNTER__>(acc);
66 alpaka::syncBlockThreads(acc);
73 while (alpaka::syncBlockThreadsPredicate<alpaka::BlockOr>(acc,
more)) {
81 alpaka::syncBlockThreads(acc);
88 alpaka::syncBlockThreads(acc);
94 alpaka::syncBlockThreads(acc);
97 auto d0 = fabs(
zz[
k] - znew[0]);
98 auto d1 = fabs(
zz[
k] - znew[1]);
109 if (0 == wnew[0] || 0 == wnew[1])
113 auto dist2 = (znew[0] - znew[1]) * (znew[0] - znew[1]);
115 auto chi2Dist = dist2 / (1.f / wnew[0] + 1.f / wnew[1]);
119 printf(
"inter %d %f %f\n", 20 -
maxiter, chi2Dist, dist2 *
data[kv].
wv());
126 auto& igv = alpaka::declareSharedVar<uint32_t, __COUNTER__>(acc);
129 alpaka::syncBlockThreads(acc);
132 ws[
it[
k]].iv() = igv;
136 alpaka::syncBlockThreads(acc);
150 #endif // RecoVertex_PixelVertexFinding_plugins_alpaka_splitVertices_h
ALPAKA_ASSERT_ACC(nvFinal<=nvIntermediate)
ALPAKA_FN_ACC ALPAKA_FN_INLINE VtxSoAView TrkSoAView WsSoAView float maxChi2
auto &__restrict__ trkdata
::reco::ZVertexTracksSoAView TrkSoAView
ALPAKA_FN_ACC ALPAKA_FN_INLINE __attribute__((always_inline)) void fitVertices(Acc1D const &acc
ZVertexSoAHeterogeneousLayout<>::View ZVertexSoAView
ZVertexTracksSoA::View ZVertexTracksSoAView
T1 atomicInc(T1 *a, T2 b)
std::vector< Block > Blocks
static const MaxIter maxiter
splitVertices(pdata, pws, maxChi2ForSplit)
PixelVertexWSSoALayout<>::View PixelVertexWorkSpaceSoAView
::vertexFinder::PixelVertexWorkSpaceSoAView WsSoAView
static constexpr float d0
ALPAKA_FN_ACC void operator()(Acc1D const &acc, VtxSoAView data, TrkSoAView trkdata, WsSoAView ws, float maxChi2) const
::reco::ZVertexSoAView VtxSoAView
static constexpr float d1
ALPAKA_ACCELERATOR_NAMESPACE::Acc1D Acc1D
T1 atomicAdd(T1 *a, T2 b)