From 27b92fb175d0fc380be92474f9526e81609d11dc Mon Sep 17 00:00:00 2001 From: Felix Weiglhofer Date: Thu, 23 Apr 2026 11:34:15 +0200 Subject: [PATCH] GPU/TPC: Fix row overflow in Pad Filter. --- GPU/GPUTracking/TPCClusterFinder/GPUTPCCFCheckPadBaseline.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GPU/GPUTracking/TPCClusterFinder/GPUTPCCFCheckPadBaseline.h b/GPU/GPUTracking/TPCClusterFinder/GPUTPCCFCheckPadBaseline.h index c47de7f79d424..7638b95ee7f0b 100644 --- a/GPU/GPUTracking/TPCClusterFinder/GPUTPCCFCheckPadBaseline.h +++ b/GPU/GPUTracking/TPCClusterFinder/GPUTPCCFCheckPadBaseline.h @@ -63,8 +63,10 @@ class GPUTPCCFCheckPadBaseline : public GPUKernelTemplate static int32_t GetNBlocks(bool isGPU) { - const int32_t nBlocks = TPC_CLUSTERER_STRIDED_PAD_COUNT / PadsPerCacheline; - return isGPU ? GPUTPCGeometry::NROWS : nBlocks; + // Important to exclude rightmost padding from Pad Filter. + // There's nothing to filter there and padding is counted as start of a row, so it causes an overflow in the row count. + const int32_t nBlocksCPU = (TPC_CLUSTERER_STRIDED_PAD_COUNT - GPUCF_PADDING_PAD) / PadsPerCacheline; + return isGPU ? GPUTPCGeometry::NROWS : nBlocksCPU; } template