Skip to content

Commit

Permalink
Merge pull request #38988 from fwyzard/gpu_duplicate_pixel_removal
Browse files Browse the repository at this point in the history
Handle pixel modules with all invalid pixels
  • Loading branch information
cmsbuild committed Aug 9, 2022
2 parents 2cc7c53 + 7ca6d96 commit ec1a3b9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions RecoLocalTracker/SiPixelClusterizer/plugins/gpuClusterChargeCut.h
Expand Up @@ -40,11 +40,21 @@ namespace gpuClustering {
auto endModule = moduleStart[0];
for (auto module = firstModule; module < endModule; module += gridDim.x) {
auto firstPixel = moduleStart[1 + module];
while (id[firstPixel] == invalidModuleId)
++firstPixel; // could be duplicates!
auto thisModuleId = id[firstPixel];
while (thisModuleId == invalidModuleId and firstPixel < numElements) {
// skip invalid or duplicate pixels
++firstPixel;
thisModuleId = id[firstPixel];
}
if (firstPixel >= numElements) {
// reached the end of the input while skipping the invalid pixels, nothing left to do
break;
}
if (thisModuleId != moduleId[module]) {
// reached the end of the module while skipping the invalid pixels, skip this module
continue;
}
assert(thisModuleId < nMaxModules);
assert(thisModuleId == moduleId[module]);

auto nclus = nClustersInModule[thisModuleId];
if (nclus == 0)
Expand Down

0 comments on commit ec1a3b9

Please sign in to comment.