Skip to content

Commit 5d91099

Browse files
authored
Merge pull request #48477 from AdrianoDee/fix_globalBeginRun_CA
Fix for `n_layers` Check in `CAHitNtupletAlpaka::globalBeginRun`
2 parents de54a4a + 64ed3f2 commit 5d91099

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtuplet.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
140140
#endif
141141

142142
auto oldLayer = 0u;
143-
auto layerCount = 0;
143+
auto layerCount = 0u;
144144

145145
std::vector<int> layerStarts(n_layers + 1);
146146
//^ why n_layers + 1? This is a cumulative sum of the number
@@ -162,7 +162,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
162162
if (layer != oldLayer) {
163163
layerStarts[layerCount++] = n_modules;
164164

165-
if (layerCount > n_layers + 1)
165+
if (layerCount >= layerStarts.size())
166166
break;
167167

168168
oldLayer = layer;

0 commit comments

Comments
 (0)