|
RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
|
RAJA header file defining automatic and builtin atomic operations. More...
#include "RAJA/config.hpp"#include "RAJA/util/macros.hpp"#include "RAJA/policy/sequential/atomic.hpp"Go to the source code of this file.
Classes | |
| struct | RAJA::auto_atomic |
| Atomic policy that automatically does "the right thing". More... | |
Namespaces | |
| RAJA | |
Macros | |
| #define | RAJA_AUTO_ATOMIC RAJA::seq_atomic {} |
Functions | |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicLoad (auto_atomic, T *acc) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE void | RAJA::atomicStore (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicAdd (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicSub (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicMin (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicMax (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicInc (auto_atomic, T *acc) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicInc (auto_atomic, T *acc, T compare) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicDec (auto_atomic, T *acc) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicDec (auto_atomic, T *acc, T compare) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicAnd (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicOr (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicXor (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicExchange (auto_atomic, T *acc, T value) |
| template<typename T > | |
| RAJA_INLINE RAJA_HOST_DEVICE T | RAJA::atomicCAS (auto_atomic, T *acc, T compare, T value) |
RAJA header file defining automatic and builtin atomic operations.
| #define RAJA_AUTO_ATOMIC RAJA::seq_atomic {} |
Provides priority between atomic policies that should do the "right thing"
If we are in a CUDA device function, then it always uses the cuda_atomic policy.
Next, if OpenMP is enabled we always use the omp_atomic, which should generally work everywhere.
Finally, we fallback on the seq_atomic, which performs non-atomic operations because we assume there is no thread safety issues (no parallel model)