Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions HeterogeneousCore/CUDAUtilities/interface/OneToManyAssoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ namespace cms {
#ifdef __CUDA_ARCH__
atomicAdd(off.data() + i, co.off[i]);
#else
auto &a = (std::atomic<Counter> &)(off[i]);
std::atomic_ref<Counter> a{off[i]};
a += co.off[i];
#endif
}
Expand All @@ -203,7 +203,7 @@ namespace cms {
#ifdef __CUDA_ARCH__
return atomicAdd(&x, 1);
#else
auto &a = (std::atomic<Counter> &)(x);
std::atomic_ref<Counter> a{x};
return a++;
#endif
}
Expand All @@ -212,7 +212,7 @@ namespace cms {
#ifdef __CUDA_ARCH__
return atomicSub(&x, 1);
#else
auto &a = (std::atomic<Counter> &)(x);
std::atomic_ref<Counter> a{x};
return a--;
#endif
}
Expand Down