1 #ifndef RecoLocalTracker_SiPixelClusterizer_plugins_gpuClustering_h 2 #define RecoLocalTracker_SiPixelClusterizer_plugins_gpuClustering_h 18 template <
bool isPhase2>
19 __global__ void countModules(uint16_t
const* __restrict__
id,
33 if (
j < 0
or id[
j] !=
id[
i]) {
41 template <
bool isPhase2>
42 __global__ void findClus(uint16_t
const* __restrict__
id,
43 uint16_t
const* __restrict__
x,
44 uint16_t
const* __restrict__
y,
60 auto thisModuleId =
id[firstPixel];
64 if (thisModuleId % 100 == 1)
66 printf(
"start clusterizer for module %d in block %d\n", thisModuleId,
blockIdx.x);
79 if (
id[
i] != thisModuleId) {
87 constexpr uint32_t maxPixInModule = 6000;
89 constexpr
auto nbits =
isPhase2 ? 10 : 9;
102 if (msize - firstPixel > maxPixInModule) {
103 printf(
"too many pixels in module %d: %d > %d\n", thisModuleId, msize - firstPixel, maxPixInModule);
104 msize = maxPixInModule + firstPixel;
109 assert(msize - firstPixel <= maxPixInModule);
112 __shared__ uint32_t totGood;
134 if (thisModuleId % 100 == 1)
136 printf(
"histo size %d\n",
hist.size());
141 hist.fill(
y[
i],
i - firstPixel);
148 printf(
"THIS IS NOT SUPPOSED TO HAPPEN too many hits in module %d: %d for block size %d\n",
156 constexpr
int maxNeighbours = 10;
168 __shared__ uint32_t n40, n60;
172 if (
hist.size(
j) > 60)
174 if (
hist.size(
j) > 40)
180 printf(
"columns with more than 60 px %d in %d\n", n60, thisModuleId);
182 printf(
"columns with more than 40 px %d in %d\n", n40, thisModuleId);
190 auto p =
hist.begin() +
j;
191 auto i = *
p + firstPixel;
199 auto m = (*p) + firstPixel;
220 auto p =
hist.begin() +
j;
221 auto i = *
p + firstPixel;
230 auto p =
hist.begin() +
j;
231 auto i = *
p + firstPixel;
232 for (
int kk = 0;
kk < nnn[
k]; ++
kk) {
234 auto m =
l + firstPixel;
257 if (thisModuleId % 100 == 1)
259 printf(
"# loops %d\n",
nloops);
311 if (thisModuleId % 100 == 1)
312 printf(
"%d clusters in module %d\n",
foundClusters, thisModuleId);
319 #endif // RecoLocalTracker_SiPixelClusterizer_plugins_gpuClustering_h
__shared__ uint8_t ok[maxNumClustersPerModules]
constexpr int nMaxModules
bool __syncthreads_or(bool x)
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ int32_t *__restrict__ uint32_t numElements
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ moduleStart
constexpr uint32_t numberOfModules
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ moduleId
constexpr uint16_t numColsInModule
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ int32_t *__restrict__ clusterId
assert(nMaxModules< maxNumModules)
std::function< unsigned int(align::ID)> Counter
cms::cuda::HistoContainer< uint8_t, 256, 16000, 8, uint16_t > Hist
T1 atomicInc(T1 *a, T2 b)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Abs< T >::type abs(const T &t)
uint16_t const *__restrict__ x
static const MaxIter maxiter
constexpr uint16_t maxNumModules
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ nClustersInModule
constexpr uint16_t invalidModuleId
T1 atomicMin_block(T1 *a, T2 b)
constexpr uint32_t numberOfModules
constexpr int invalidClusterId
bool __syncthreads_and(bool x)
T1 atomicMin(T1 *a, T2 b)
uint16_t const *__restrict__ uint16_t const *__restrict__ y
__shared__ unsigned int foundClusters
T1 atomicAdd(T1 *a, T2 b)