Skip to content

Commit 7a4fd45

Browse files
fweigdavidrohr
authored andcommitted
GPU/TPC: Fix row overflow in Pad Filter.
1 parent 1120c99 commit 7a4fd45

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

GPU/GPUTracking/TPCClusterFinder/GPUTPCCFCheckPadBaseline.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ class GPUTPCCFCheckPadBaseline : public GPUKernelTemplate
6363

6464
static int32_t GetNBlocks(bool isGPU)
6565
{
66-
const int32_t nBlocks = TPC_CLUSTERER_STRIDED_PAD_COUNT / PadsPerCacheline;
67-
return isGPU ? GPUTPCGeometry::NROWS : nBlocks;
66+
// Important to exclude rightmost padding from Pad Filter.
67+
// There's nothing to filter there and padding is counted as start of a row, so it causes an overflow in the row count.
68+
const int32_t nBlocksCPU = (TPC_CLUSTERER_STRIDED_PAD_COUNT - GPUCF_PADDING_PAD) / PadsPerCacheline;
69+
return isGPU ? GPUTPCGeometry::NROWS : nBlocksCPU;
6870
}
6971

7072
template <int32_t iKernel = defaultKernel>

0 commit comments

Comments
 (0)