@@ -24,6 +24,7 @@ using namespace o2::gpu::tpccf;
2424template <>
2525GPUdii () void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::scanStart>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUSharedMemory& smem, processorType& clusterer, int32_t iBuf, int32_t stage)
2626{
27+ #ifdef GPUCA_GPUCODE
2728 int32_t nElems = CompactionElems (clusterer, stage);
2829
2930 const auto * predicate = clusterer.mPisPeak ;
@@ -35,17 +36,19 @@ GPUdii() void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::scanSta
3536 pred = predicate[iThreadGlobal];
3637 }
3738
38- int32_t nElemsInBlock = CfUtils::blockPredicateSum<GPUCA_THREAD_COUNT_SCAN >(smem, pred);
39+ int32_t nElemsInBlock = CfUtils::blockPredicateSum<GPUCA_PAR_CF_SCAN_WORKGROUP_SIZE >(smem, pred);
3940
4041 int32_t lastThread = nThreads - 1 ;
4142 if (iThread == lastThread) {
4243 scanOffset[iBlock] = nElemsInBlock;
4344 }
45+ #endif
4446}
4547
4648template <>
4749GPUdii () void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::scanUp>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUSharedMemory& smem, processorType& clusterer, int32_t iBuf, int32_t nElems)
4850{
51+ #ifdef GPUCA_GPUCODE
4952 auto * scanOffset = clusterer.GetScanBuffer (iBuf - 1 );
5053 auto * scanOffsetNext = clusterer.GetScanBuffer (iBuf);
5154
@@ -59,11 +62,13 @@ GPUdii() void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::scanUp>
5962 if (iThread == lastThread) {
6063 scanOffsetNext[iBlock] = offsetInBlock;
6164 }
65+ #endif
6266}
6367
6468template <>
6569GPUdii () void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::scanTop>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUSharedMemory& smem, processorType& clusterer, int32_t iBuf, int32_t nElems)
6670{
71+ #ifdef GPUCA_GPUCODE
6772 int32_t iThreadGlobal = get_global_id (0 );
6873 int32_t * scanOffset = clusterer.GetScanBuffer (iBuf - 1 );
6974
@@ -74,11 +79,13 @@ GPUdii() void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::scanTop
7479 if (inBounds) {
7580 scanOffset[iThreadGlobal] = offsetInBlock;
7681 }
82+ #endif
7783}
7884
7985template <>
8086GPUdii () void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::scanDown>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUSharedMemory& /* smem*/ , processorType& clusterer, int32_t iBuf, uint32_t offset, int32_t nElems)
8187{
88+ #ifdef GPUCA_GPUCODE
8289 int32_t iThreadGlobal = get_global_id (0 ) + offset;
8390
8491 int32_t * scanOffsetPrev = clusterer.GetScanBuffer (iBuf - 1 );
@@ -89,11 +96,13 @@ GPUdii() void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::scanDow
8996 if (iThreadGlobal < nElems) {
9097 scanOffsetPrev[iThreadGlobal] += shift;
9198 }
99+ #endif
92100}
93101
94102template <>
95103GPUdii () void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::compactDigits>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUSharedMemory& smem, processorType& clusterer, int32_t iBuf, int32_t stage, CfChargePos* in, CfChargePos* out)
96104{
105+ #ifdef GPUCA_GPUCODE
97106 uint32_t nElems = CompactionElems (clusterer, stage);
98107 SizeT bufferSize = (stage) ? clusterer.mNMaxClusters : clusterer.mNMaxPeaks ;
99108
@@ -105,7 +114,7 @@ GPUdii() void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::compact
105114 bool iAmDummy = (iThreadGlobal >= nElems);
106115
107116 int32_t pred = (iAmDummy) ? 0 : predicate[iThreadGlobal];
108- int32_t offsetInBlock = CfUtils::blockPredicateScan<GPUCA_THREAD_COUNT_SCAN >(smem, pred);
117+ int32_t offsetInBlock = CfUtils::blockPredicateScan<GPUCA_PAR_CF_SCAN_WORKGROUP_SIZE >(smem, pred);
109118
110119 SizeT globalOffsetOut = offsetInBlock;
111120 if (iBlock > 0 ) {
@@ -129,6 +138,7 @@ GPUdii() void GPUTPCCFStreamCompaction::Thread<GPUTPCCFStreamCompaction::compact
129138 clusterer.mPmemory ->counters .nPeaks = nFinal;
130139 }
131140 }
141+ #endif
132142}
133143
134144GPUdii () int32_t GPUTPCCFStreamCompaction::CompactionElems(processorType& clusterer, int32_t stage)
0 commit comments