cupla
cupla copied to clipboard
add atomic functions
Atomic add and exchange are currently added with a macro function. It is better to implement inlined functions for that.
I don't think inlining works transparently here, because we need to have acc as a parameter.
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_WARNINGto 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
{
// ...
}