Skip to content

Commit 0b96515

Browse files
psychocoderHPCsbastrakov
authored andcommitted
HIP: use build-in atomicAdd(double)
HIP is providing for HIP 4.2+ native atomicAdd interfaces for double precision. Use always the build-in atomicAdd so speedup atomic add.
1 parent 8acfbe4 commit 0b96515

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/alpaka/atomic/AtomicUniformCudaHipBuiltIn.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ namespace alpaka
124124
double* const addr,
125125
double const& value) -> double
126126
{
127-
# if BOOST_ARCH_PTX >= BOOST_VERSION_NUMBER(6, 0, 0)
127+
# if BOOST_ARCH_PTX >= BOOST_VERSION_NUMBER(6, 0, 0) || BOOST_LANG_HIP
128128
return ::atomicAdd(addr, value);
129129
# else
130130
// Code from: http://docs.nvidia.com/cuda/cuda-c-programming-guide/#atomic-functions

0 commit comments

Comments
 (0)