25 template<
typename TOp,
typename T,
typename T_Scope = scope::Device>
26 constexpr auto atomicOp(
auto const& acc, T*
const addr, T
const& value, T_Scope
const scope = T_Scope()) -> T
28 static_assert(!std::is_same_v<T_Scope, scope::System>,
"System scope is currently not supported.");
43 template<
typename TOp,
typename T,
typename T_Scope = scope::Device>
49 T_Scope
const scope = T_Scope()) -> T
51 static_assert(!std::is_same_v<T_Scope, scope::System>,
"System scope is currently not supported.");
65 template<
typename T,
typename T_Scope = scope::Device>
66 constexpr auto atomicAdd(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
76 template<
typename T,
typename T_Scope = scope::Device>
77 constexpr auto atomicSub(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
87 template<
typename T,
typename T_Scope = scope::Device>
88 constexpr auto atomicMin(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
98 template<
typename T,
typename T_Scope = scope::Device>
99 constexpr auto atomicMax(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
109 template<
typename T,
typename T_Scope = scope::Device>
110 constexpr auto atomicExch(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
120 template<
typename T,
typename T_Scope = scope::Device>
121 constexpr auto atomicInc(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
131 template<
typename T,
typename T_Scope = scope::Device>
132 constexpr auto atomicDec(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
142 template<
typename T,
typename T_Scope = scope::Device>
143 constexpr auto atomicAnd(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
153 template<
typename T,
typename T_Scope = scope::Device>
154 constexpr auto atomicOr(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
164 template<
typename T,
typename T_Scope = scope::Device>
165 constexpr auto atomicXor(
auto const& acc, T*
const addr, T
const& value, T_Scope
const hier = T_Scope()) -> T
176 template<
typename T,
typename T_Scope = scope::Device>
182 T_Scope
const hier = T_Scope()) -> T
201 alpaka::unused(acc, inOut, args...);
204 "You must specialize alpakaAtomicInvoke() for your functor. Best place the overload in the namespace "
206 "functor, it will be found by ADL.");
#define ALPAKA_FN_ACC
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_F...
#define ALPAKA_TYPEOF(...)
Get the type of instance.
#define ALPAKA_FORWARD(instance)
Perfectly forward an instance as argument.
Concept to check if a type is an accelerator.
alpaka'S function interface
ALPAKA_FN_ACC void alpakaAtomicInvoke(auto &&fn, concepts::Acc auto const &acc, auto *inOut, auto &&... args)
Defines the equivalent of an atomic invoke for user defined functors.
constexpr decltype(auto) getAtomicImpl(T_Executor const executor, T_AtomicScope const atomicScope)
functionality which is usable on the accelerator compute device from within a kernel.
constexpr auto atomicAnd(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic and operation.
constexpr auto atomicOp(auto const &acc, T *const addr, T const &value, T_Scope const scope=T_Scope()) -> T
Executes the given operation atomically.
constexpr auto atomicCas(auto const &acc, T *const addr, T const &compare, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic compare-and-swap operation.
constexpr auto atomicXor(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic xor operation.
constexpr auto atomicAdd(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic add operation.
constexpr auto atomicSub(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic sub operation.
constexpr auto atomicExch(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic exchange operation.
constexpr auto atomicDec(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic decrement operation.
constexpr auto atomicInc(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic increment operation.
constexpr auto atomicOr(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic or operation.
constexpr auto atomicMin(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic min operation.
constexpr auto atomicMax(auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T
Executes an atomic max operation.