1 #ifndef RecoTracker_PixelVertexFinding_plugins_alpaka_clusterTracksDBSCAN_h 2 #define RecoTracker_PixelVertexFinding_plugins_alpaka_clusterTracksDBSCAN_h 8 #include <alpaka/alpaka.hpp> 26 template <
typename TAcc>
36 const uint32_t
threadIdxLocal(alpaka::getIdx<alpaka::Block, alpaka::Threads>(acc)[0u]);
44 auto& __restrict__
ws =
pws;
46 float const* __restrict__
zt =
ws.zt();
47 float const* __restrict__
ezt2 =
ws.ezt2();
52 uint8_t* __restrict__
izt =
ws.izt();
53 int32_t* __restrict__
nn =
data.ndof();
54 int32_t* __restrict__
iv =
ws.iv();
62 auto&
hist = alpaka::declareSharedVar<Hist, __COUNTER__>(acc);
63 auto&
hws = alpaka::declareSharedVar<Hist::Counter[32], __COUNTER__>(acc);
68 alpaka::syncBlockThreads(acc);
72 printf(
"booked hist with %d bins, size %d for %d tracks\n",
hist.nbins(),
hist.capacity(),
nt);
81 iz = std::clamp(iz, INT8_MIN, INT8_MAX);
82 izt[
i] = iz - INT8_MIN;
89 alpaka::syncBlockThreads(acc);
92 alpaka::syncBlockThreads(acc);
94 alpaka::syncBlockThreads(acc);
99 alpaka::syncBlockThreads(acc);
105 auto loop = [&](uint32_t
j) {
118 alpaka::syncBlockThreads(acc);
125 auto loop = [&](uint32_t
j) {
140 alpaka::syncBlockThreads(acc);
148 alpaka::syncBlockThreads(acc);
159 alpaka::syncBlockThreads(acc);
167 alpaka::syncBlockThreads(acc);
176 auto loop = [&](uint32_t
j) {
193 alpaka::syncBlockThreads(acc);
202 auto loop = [&](uint32_t
j) {
216 auto&
foundClusters = alpaka::declareSharedVar<unsigned int, __COUNTER__>(acc);
218 alpaka::syncBlockThreads(acc);
223 if (
iv[
i] ==
int(
i)) {
232 alpaka::syncBlockThreads(acc);
243 alpaka::syncBlockThreads(acc);
261 #endif // RecoTracker_PixelVertexFinding_plugins_alpaka_clusterTracksDBSCAN_h
ALPAKA_FN_ACC void operator()(const TAcc &acc, VtxSoAView pdata, WsSoAView pws, int minT, float eps, float errmax, float chi2max) const
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
ZVertexSoAHeterogeneousLayout<>::View ZVertexSoAView
T1 atomicInc(T1 *a, T2 b)
ALPAKA_FN_ACC ALPAKA_FN_INLINE void VtxSoAView WsSoAView & pws
Abs< T >::type abs(const T &t)
ALPAKA_FN_ACC ALPAKA_FN_INLINE void VtxSoAView WsSoAView int minT
PixelVertexWSSoALayout<>::View PixelVertexWorkSpaceSoAView
::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