1 #ifndef RecoLocalTracker_SiPixelClusterizer_plugins_gpuClustering_h 2 #define RecoLocalTracker_SiPixelClusterizer_plugins_gpuClustering_h 21 namespace pixelStatus {
50 uint32_t expected = old_word;
59 uint32_t new_word = old_word | (
static_cast<uint32_t
>(new_status) <<
shift);
61 }
while (expected != old_word);
70 template <
typename TrackerTraits>
71 __global__ void countModules(uint16_t
const* __restrict__
id,
87 if (
j < 0
or id[
j] !=
id[
i]) {
95 template <
typename TrackerTraits>
96 __global__ void findClus(uint32_t* __restrict__ rawIdArr,
97 uint16_t* __restrict__
id,
98 uint16_t
const* __restrict__
x,
99 uint16_t
const* __restrict__
y,
119 auto thisModuleId =
id[firstPixel];
123 if (thisModuleId % 100 == 1)
125 printf(
"start clusterizer for module %d in block %d\n", thisModuleId,
blockIdx.x);
138 if (
id[
i] != thisModuleId) {
146 constexpr uint32_t maxPixInModule = TrackerTraits::maxPixInModule;
148 constexpr auto nbits = TrackerTraits::clusterBits;
162 if (
msize - firstPixel > maxPixInModule) {
163 printf(
"too many pixels in module %d: %d > %d\n", thisModuleId,
msize - firstPixel, maxPixInModule);
164 msize = maxPixInModule + firstPixel;
167 printf(
"pixelInModule > %d\n",
msize - firstPixel);
175 __shared__ uint32_t totGood;
225 if (thisModuleId % 100 == 1)
227 printf(
"histo size %d\n",
hist.size());
232 hist.fill(
y[
i],
i - firstPixel);
239 printf(
"THIS IS NOT SUPPOSED TO HAPPEN too many hits in module %d: %d for block size %d\n",
259 __shared__ uint32_t n40, n60;
263 if (
hist.size(
j) > 60)
265 if (
hist.size(
j) > 40)
271 printf(
"columns with more than 60 px %d in %d\n", n60, thisModuleId);
273 printf(
"columns with more than 40 px %d in %d\n", n40, thisModuleId);
281 auto p =
hist.begin() +
j;
282 auto i = *
p + firstPixel;
290 auto m = (*p) + firstPixel;
311 auto p =
hist.begin() +
j;
312 auto i = *
p + firstPixel;
321 auto p =
hist.begin() +
j;
322 auto i = *
p + firstPixel;
323 for (
int kk = 0;
kk < nnn[
k]; ++
kk) {
325 auto m =
l + firstPixel;
348 if (thisModuleId % 100 == 1)
350 printf(
"# loops %d\n",
nloops);
402 if (thisModuleId % 100 == 1)
403 printf(
"%d clusters in module %d\n",
foundClusters, thisModuleId);
410 #endif // RecoLocalTracker_SiPixelClusterizer_plugins_gpuClustering_h cms::alpakatools::HistoContainer< uint8_t, 256, 16000, 8, uint16_t > Hist
constexpr uint32_t valuesPerWord
__shared__ uint8_t ok[maxNumClustersPerModules]
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ nClustersInModule
constexpr int nMaxModules
bool __syncthreads_or(bool x)
T1 atomicCAS(T1 *address, T1 compare, T2 val)
__device__ constexpr Status getStatus(uint32_t const *__restrict__ status, uint16_t x, uint16_t y)
constexpr uint32_t pixelSizeY
uint16_t *__restrict__ uint16_t const *__restrict__ x
constexpr uint16_t numberOfModules
constexpr uint32_t pixelSizeX
uint16_t *__restrict__ uint16_t const *__restrict__ uint16_t const *__restrict__ y
assert(TrackerTraits::numberOfModules< maxNumModules)
std::function< unsigned int(align::ID)> Counter
__shared__ uint32_t status[pixelStatusSize]
T1 atomicInc(T1 *a, T2 b)
static __device__ constexpr uint32_t getIndex(uint16_t x, uint16_t y)
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)
static const MaxIter maxiter
constexpr uint16_t maxNumModules
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ int32_t *__restrict__ clusterId
constexpr uint16_t invalidModuleId
T1 atomicMin_block(T1 *a, T2 b)
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ int32_t *__restrict__ uint32_t numElements
__device__ constexpr uint32_t getShift(uint16_t x, uint16_t y)
__device__ constexpr void promote(uint32_t *__restrict__ status, const uint16_t x, const uint16_t y)
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ moduleStart
static unsigned int const shift
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ moduleId
constexpr int invalidClusterId
bool __syncthreads_and(bool x)
T1 atomicMin(T1 *a, T2 b)
__device__ constexpr bool isDuplicate(uint32_t const *__restrict__ status, uint16_t x, uint16_t y)
T1 atomicAdd(T1 *a, T2 b)
constexpr const uint32_t pixelStatusSize