Skip to content

Commit e966e71

Browse files
committed
GPU: Add missing static_assert to guarantee correct unroll factor, will crash otherwise (apparently forgotten by AMD)
1 parent fc52b5d commit e966e71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

GPU/GPUTracking/SectorTracker/GPUTPCNeighboursFinder.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ GPUdii() void GPUTPCNeighboursFinder::Thread<0>(int32_t /*nBlocks*/, int32_t nTh
7676
}
7777

7878
static constexpr uint32_t UNROLL_GLOBAL = 4;
79+
static_assert(GPUCA_MAXN % UNROLL_GLOBAL == 0);
7980
static constexpr uint32_t MAX_SHARED = GPUCA_PAR_NEIGHBOURS_FINDER_MAX_NNEIGHUP;
8081
static constexpr uint32_t MAX_GLOBAL = (MAX_SHARED < GPUCA_MAXN) ? (((GPUCA_MAXN - MAX_SHARED - 1) / UNROLL_GLOBAL + 1) * UNROLL_GLOBAL) : 0;
8182
static constexpr uint32_t MAX_TOTAL = MAX_SHARED + MAX_GLOBAL;

0 commit comments

Comments
 (0)