2727#endif
2828
2929#if defined(__HIPCC__)
30- #define GPUCA_CUB hipcub
30+ #define GPUCA_CUB_NAMESPACE hipcub
3131#else
32- #define GPUCA_CUB cub
32+ #define GPUCA_CUB_NAMESPACE cub
3333#endif
3434
3535namespace o2 ::gpu
@@ -54,7 +54,7 @@ class GPUKernelTemplate
5454 struct GPUSharedMemoryWarpScan64 {
5555 // Provides the shared memory resources for warp wide CUB collectives
5656#if (defined(__CUDACC__) || defined(__HIPCC__)) && defined(GPUCA_GPUCODE) && !defined(GPUCA_GPUCODE_HOSTONLY)
57- typedef GPUCA_CUB ::WarpScan<T> WarpScan;
57+ typedef GPUCA_CUB_NAMESPACE ::WarpScan<T> WarpScan;
5858 union {
5959 typename WarpScan::TempStorage cubWarpTmpMem;
6060 };
@@ -65,9 +65,9 @@ class GPUKernelTemplate
6565 struct GPUSharedMemoryScan64 {
6666 // Provides the shared memory resources for CUB collectives
6767#if (defined(__CUDACC__) || defined(__HIPCC__)) && defined(GPUCA_GPUCODE) && !defined(GPUCA_GPUCODE_HOSTONLY)
68- typedef GPUCA_CUB ::BlockScan<T, I> BlockScan;
69- typedef GPUCA_CUB ::BlockReduce<T, I> BlockReduce;
70- typedef GPUCA_CUB ::WarpScan<T> WarpScan;
68+ typedef GPUCA_CUB_NAMESPACE ::BlockScan<T, I> BlockScan;
69+ typedef GPUCA_CUB_NAMESPACE ::BlockReduce<T, I> BlockReduce;
70+ typedef GPUCA_CUB_NAMESPACE ::WarpScan<T> WarpScan;
7171 union {
7272 typename BlockScan::TempStorage cubTmpMem;
7373 typename BlockReduce::TempStorage cubReduceTmpMem;
@@ -110,6 +110,6 @@ class GPUitoa : public GPUKernelTemplate
110110
111111} // namespace o2::gpu
112112
113- #undef GPUCA_CUB
113+ #undef GPUCA_CUB_NAMESPACE
114114
115115#endif
0 commit comments