Skip to content

Commit

Permalink
HIP: use build-in atomicAdd(double)
Browse files Browse the repository at this point in the history
HIP is providing for HIP 4.2+ native atomicAdd interfaces for double precision.
Use always the build-in atomicAdd so speedup atomic add.
  • Loading branch information
psychocoderHPC authored and sbastrakov committed Jul 27, 2022
1 parent 8acfbe4 commit 0b96515
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/alpaka/atomic/AtomicUniformCudaHipBuiltIn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace alpaka
double* const addr,
double const& value) -> double
{
# if BOOST_ARCH_PTX >= BOOST_VERSION_NUMBER(6, 0, 0)
# if BOOST_ARCH_PTX >= BOOST_VERSION_NUMBER(6, 0, 0) || BOOST_LANG_HIP
return ::atomicAdd(addr, value);
# else
// Code from: http://docs.nvidia.com/cuda/cuda-c-programming-guide/#atomic-functions
Expand Down

0 comments on commit 0b96515

Please sign in to comment.