12 #include <type_traits>
30 template<
typename THierarchy>
52 template<
typename THierarchy>
59 template<
typename TOp,
typename TAtomic,
typename T,
typename THierarchy,
typename TSfinae =
void>
72 template<
typename TOp,
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
74 TAtomic
const& atomic,
77 THierarchy
const& = THierarchy()) -> T
93 template<
typename TOp,
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
95 TAtomic
const& atomic,
99 THierarchy
const& = THierarchy()) -> T
113 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
115 TAtomic
const& atomic,
118 THierarchy
const& hier = THierarchy()) -> T
120 return atomicOp<AtomicAdd>(atomic, addr, value, hier);
131 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
133 TAtomic
const& atomic,
136 THierarchy
const& hier = THierarchy()) -> T
138 return atomicOp<AtomicSub>(atomic, addr, value, hier);
149 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
151 TAtomic
const& atomic,
154 THierarchy
const& hier = THierarchy()) -> T
156 return atomicOp<AtomicMin>(atomic, addr, value, hier);
167 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
169 TAtomic
const& atomic,
172 THierarchy
const& hier = THierarchy()) -> T
174 return atomicOp<AtomicMax>(atomic, addr, value, hier);
185 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
187 TAtomic
const& atomic,
190 THierarchy
const& hier = THierarchy()) -> T
192 return atomicOp<AtomicExch>(atomic, addr, value, hier);
203 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
205 TAtomic
const& atomic,
208 THierarchy
const& hier = THierarchy()) -> T
210 return atomicOp<AtomicInc>(atomic, addr, value, hier);
221 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
223 TAtomic
const& atomic,
226 THierarchy
const& hier = THierarchy()) -> T
228 return atomicOp<AtomicDec>(atomic, addr, value, hier);
239 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
241 TAtomic
const& atomic,
244 THierarchy
const& hier = THierarchy()) -> T
246 return atomicOp<AtomicAnd>(atomic, addr, value, hier);
257 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
259 TAtomic
const& atomic,
262 THierarchy
const& hier = THierarchy()) -> T
264 return atomicOp<AtomicOr>(atomic, addr, value, hier);
275 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
277 TAtomic
const& atomic,
280 THierarchy
const& hier = THierarchy()) -> T
282 return atomicOp<AtomicXor>(atomic, addr, value, hier);
294 template<
typename TAtomic,
typename T,
typename THierarchy = hierarchy::Gr
ids>
296 TAtomic
const& atomic,
300 THierarchy
const& hier = THierarchy()) -> T
302 return atomicOp<AtomicCas>(atomic, addr, compare, value, hier);
#define ALPAKA_FN_HOST_ACC
#define ALPAKA_NO_HOST_ACC_WARNING
Disable nvcc warning: 'calling a host function from host device function.' Usage: ALPAKA_NO_HOST_ACC_...
typename detail::ImplementationBaseType< TInterface, TDerived >::type ImplementationBase
Returns the type that implements the given interface in the inheritance hierarchy.
The alpaka accelerator library.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicXor(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic xor operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicExch(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic exchange operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicSub(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic sub operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicOp(TAtomic const &atomic, T *const addr, T const &compare, T const &value, THierarchy const &=THierarchy()) -> T
Executes the given operation atomically.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicMin(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic min operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicInc(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic increment operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicDec(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic decrement operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicMax(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic max operation.
typename detail::AtomicHierarchyConceptType< THierarchy >::type AtomicHierarchyConcept
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicCas(TAtomic const &atomic, T *const addr, T const &compare, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic compare-and-swap operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicAdd(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic add operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicOr(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic or operation.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicOp(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &=THierarchy()) -> T
Executes the given operation atomically.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicAnd(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
Executes an atomic and operation.
The atomic operation trait.