1 #ifndef RecoTracker_PixelVertexFinding_clusterTracksIterativeAlpaka_h 2 #define RecoTracker_PixelVertexFinding_clusterTracksIterativeAlpaka_h 8 #include <alpaka/alpaka.hpp> 25 template <
typename TAcc>
35 const uint32_t
threadIdxLocal(alpaka::getIdx<alpaka::Block, alpaka::Threads>(acc)[0u]);
43 auto& __restrict__
ws =
pws;
45 float const* __restrict__
zt =
ws.zt();
46 float const* __restrict__
ezt2 =
ws.ezt2();
51 uint8_t* __restrict__
izt =
ws.izt();
52 int32_t* __restrict__
nn =
data.ndof();
53 int32_t* __restrict__
iv =
ws.iv();
61 auto&
hist = alpaka::declareSharedVar<Hist, __COUNTER__>(acc);
62 auto&
hws = alpaka::declareSharedVar<Hist::Counter[32], __COUNTER__>(acc);
67 alpaka::syncBlockThreads(acc);
71 printf(
"booked hist with %d bins, size %d for %d tracks\n",
hist.nbins(),
hist.capacity(),
nt);
80 iz = std::clamp(iz, INT8_MIN, INT8_MAX);
81 izt[
i] = iz - INT8_MIN;
88 alpaka::syncBlockThreads(acc);
92 alpaka::syncBlockThreads(acc);
95 alpaka::syncBlockThreads(acc);
101 alpaka::syncBlockThreads(acc);
107 auto loop = [&](uint32_t
j) {
121 auto&
nloops = alpaka::declareSharedVar<int, __COUNTER__>(acc);
124 alpaka::syncBlockThreads(acc);
128 while (alpaka::syncBlockThreadsPredicate<alpaka::BlockOr>(acc,
more)) {
139 auto p =
hist.begin() +
k;
144 auto loop = [&](uint32_t
j) {
175 auto loop = [&](
int j) {
189 auto&
foundClusters = alpaka::declareSharedVar<unsigned int, __COUNTER__>(acc);
191 alpaka::syncBlockThreads(acc);
196 if (
iv[
i] ==
int(
i)) {
205 alpaka::syncBlockThreads(acc);
216 alpaka::syncBlockThreads(acc);
233 #endif // RecoTracker_PixelVertexFinding_plugins_clusterTracksIterativeAlpaka_h
uint8_t *__restrict__ izt
const uint32_t threadIdxLocal(alpaka::getIdx< alpaka::Block, alpaka::Threads >(acc)[0u])
ALPAKA_FN_ACC ALPAKA_FN_INLINE void VtxSoAView & pdata
ALPAKA_FN_ACC ALPAKA_FN_INLINE void VtxSoAView WsSoAView int float eps
uint32_t & nvIntermediate
ALPAKA_FN_ACC ALPAKA_FN_INLINE void VtxSoAView WsSoAView int float float errmax
constexpr uint32_t MAXTRACKS
float const *__restrict__ ezt2
T1 atomicInc(T1 *a, T2 b)
ALPAKA_FN_ACC ALPAKA_FN_INLINE void VtxSoAView WsSoAView & pws
ALPAKA_FN_ACC void operator()(const TAcc &acc, VtxSoAView pdata, WsSoAView pws, int minT, float eps, float errmax, float chi2max) const
std::vector< Block > Blocks
Abs< T >::type abs(const T &t)
ALPAKA_FN_ACC ALPAKA_FN_INLINE void VtxSoAView WsSoAView int minT
::vertexFinder::PixelVertexWorkSpaceSoAView WsSoAView
ALPAKA_FN_ACC ALPAKA_FN_INLINE void VtxSoAView WsSoAView int float float float chi2max
float const *__restrict__ zt
::reco::ZVertexSoAView VtxSoAView
constexpr uint32_t MAXVTX
T1 atomicMin(T1 *a, T2 b)