Skip to content

Commit c6d61a7

Browse files
authored
Merge pull request #49142 from fwyzard/pixel_digi_morphing_avoid_overflow_160x
Clamp `fakePixels` to `maxFakesInModule`
2 parents 3bfb62d + 824875b commit c6d61a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

RecoLocalTracker/SiPixelClusterizer/plugins/alpaka/PixelClustering.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,12 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering {
493493
}
494494
alpaka::syncBlockThreads(acc);
495495

496+
// Clamp fakePixels to maxFakesInModule
497+
if (fakePixels > maxFakesInModule) {
498+
fakePixels = maxFakesInModule;
499+
alpaka::syncBlockThreads(acc);
500+
}
501+
496502
} // if (applyDigiMorphing)
497503
} // if (lastPixel > 1)
498504
} // if constexpr (not isPhase2)

0 commit comments

Comments
 (0)