cupla icon indicating copy to clipboard operation
cupla copied to clipboard

add atomic functions

Open psychocoderHPC opened this issue 10 years ago • 2 comments

Atomic add and exchange are currently added with a macro function. It is better to implement inlined functions for that.

psychocoderHPC avatar Feb 27 '16 14:02 psychocoderHPC

I don't think inlining works transparently here, because we need to have acc as a parameter.

mxmlnkn avatar Feb 28 '16 01:02 mxmlnkn

although issue itself is a bit outdated, I just want to add that few atomics like atomicXor and atomicOr are still missing.

Few more notes:

  • Device functions have to provide the acc object in the signature when using CUDA/CUPLA functions
  • you might need an additional ALPAKA_NO_HOST_ACC_WARNING to suppress warnings/errors like calling device function from host code
    ALPAKA_NO_HOST_ACC_WARNING
    template< typename T_Acc >
    ALPAKA_FN_ACC
    void operator()( T_Acc const & acc, ... ) const
    {
        // ...
    }

tdd11235813 avatar May 08 '19 17:05 tdd11235813