Skip to content

Commit 1de28ad

Browse files
committed
GPU: Fix parameter that was forgotten when moving to if constexpr with GPUCA_PAR_...
1 parent fc8f84f commit 1de28ad

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

GPU/GPUTracking/Definitions/GPUDefParametersDefaults.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,9 @@
574574
#ifndef GPUCA_PAR_COMP_GATHER_MODE
575575
#define GPUCA_PAR_COMP_GATHER_MODE 0
576576
#endif
577+
#ifndef GPUCA_PAR_NO_ATOMIC_PRECHECK
578+
#define GPUCA_PAR_NO_ATOMIC_PRECHECK 0
579+
#endif
577580
#ifndef GPUCA_PAR_DEDX_STORAGE_TYPE
578581
#define GPUCA_PAR_DEDX_STORAGE_TYPE float
579582
#endif

GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,11 +631,11 @@ GPUd() float GPUTPCGMTrackParam::AttachClusters(const GPUTPCGMMerger* GPUrestric
631631
for (uint32_t ih = hitFst; ih < hitLst; ih++) {
632632
int32_t id = idOffset + ids[ih];
633633
GPUAtomic(uint32_t)* const weight = weights + id;
634-
#if GPUCA_NO_ATOMIC_PRECHECK == 0
635-
if (myWeight <= *weight) {
636-
continue;
634+
if constexpr (GPUCA_PAR_NO_ATOMIC_PRECHECK == 0) {
635+
if (myWeight <= *weight) {
636+
continue;
637+
}
637638
}
638-
#endif
639639
const cahit2 hh = CA_TEXTURE_FETCH(cahit2, gAliTexRefu2, hits, ih);
640640
const float y = y0 + hh.x * stepY;
641641
const float z = z0 + hh.y * stepZ;

0 commit comments

Comments
 (0)