27 # if _OPENMP >= 201107
30 template<
typename T,
typename THierarchy>
39 # pragma GCC diagnostic push
40 # pragma GCC diagnostic ignored "-Wconversion"
42 # pragma omp atomic capture
48 # pragma GCC diagnostic pop
55 template<
typename T,
typename THierarchy>
64 # pragma GCC diagnostic push
65 # pragma GCC diagnostic ignored "-Wconversion"
67 # pragma omp atomic capture
73 # pragma GCC diagnostic pop
80 template<
typename T,
typename THierarchy>
88 # pragma omp atomic capture
98 template<
typename T,
typename THierarchy>
107 # pragma GCC diagnostic push
108 # pragma GCC diagnostic ignored "-Wconversion"
110 # pragma omp atomic capture
116 # pragma GCC diagnostic pop
123 template<
typename T,
typename THierarchy>
132 # pragma GCC diagnostic push
133 # pragma GCC diagnostic ignored "-Wconversion"
135 # pragma omp atomic capture
141 # pragma GCC diagnostic pop
148 template<
typename T,
typename THierarchy>
157 # pragma GCC diagnostic push
158 # pragma GCC diagnostic ignored "-Wconversion"
160 # pragma omp atomic capture
166 # pragma GCC diagnostic pop
176 # if _OPENMP >= 202011
179 template<
typename T,
typename THierarchy>
187 # pragma omp atomic capture compare
202 template<
typename T,
typename THierarchy>
203 struct AtomicOp<AtomicMax, AtomicOmpBuiltIn, T, THierarchy>
210 # pragma omp atomic capture compare
225 template<
typename T,
typename THierarchy>
226 struct AtomicOp<AtomicInc, AtomicOmpBuiltIn, T, THierarchy>
232 # pragma omp critical(AlpakaOmpAtomicOp)
234 old = AtomicInc{}(addr, value);
241 template<
typename T,
typename THierarchy>
242 struct AtomicOp<AtomicDec, AtomicOmpBuiltIn, T, THierarchy>
248 # pragma omp critical(AlpakaOmpAtomicOp)
250 old = AtomicDec{}(addr, value);
257 template<
typename T,
typename THierarchy>
258 struct AtomicOp<AtomicCas, AtomicOmpBuiltIn, T, THierarchy>
265 # pragma omp atomic capture compare
283 template<
typename TOp,
typename T,
typename THierarchy>
291 # pragma omp critical(AlpakaOmpAtomicOp)
293 old = TOp()(addr, value);
307 # pragma omp critical(AlpakaOmpAtomicOp2)
309 old = TOp()(addr, compare, value);
The OpenMP accelerators atomic ops.
The alpaka accelerator library.
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.
The addition function object.
The exchange function object.
The minimum function object.
The subtraction function object.
The exclusive or function object.
static ALPAKA_FN_HOST auto atomicOp(AtomicOmpBuiltIn const &, T *const addr, T const &value) -> T
static ALPAKA_FN_HOST auto atomicOp(AtomicOmpBuiltIn const &, T *const addr, T const &value) -> T
static ALPAKA_FN_HOST auto atomicOp(AtomicOmpBuiltIn const &, T *const addr, T const &value) -> T
static ALPAKA_FN_HOST auto atomicOp(AtomicOmpBuiltIn const &, T *const addr, T const &value) -> T
static ALPAKA_FN_HOST auto atomicOp(AtomicOmpBuiltIn const &, T *const addr, T const &value) -> T
static ALPAKA_FN_HOST auto atomicOp(AtomicOmpBuiltIn const &, T *const addr, T const &value) -> T
static ALPAKA_FN_HOST auto atomicOp(AtomicOmpBuiltIn const &, T *const addr, T const &value) -> T
static ALPAKA_FN_HOST auto atomicOp(AtomicOmpBuiltIn const &, T *const addr, T const &compare, T const &value) -> T
The atomic operation trait.