Celeritas
0.5.0-86+4a8eea4
|
Atomics for use in kernel code (CUDA/HIP/OpenMP). More...
#include "corecel/Assert.hh"
#include "corecel/Macros.hh"
#include "corecel/Types.hh"
#include "Algorithms.hh"
Functions | |
template<class T > | |
CELER_FORCEINLINE_FUNCTION T | celeritas::atomic_add (T *address, T value) |
Add to a value, returning the original value. More... | |
template<class T > | |
CELER_FORCEINLINE_FUNCTION T | celeritas::atomic_min (T *address, T value) |
Set the value to the minimum of the actual and given, returning old. | |
template<class T > | |
CELER_FORCEINLINE_FUNCTION T | celeritas::atomic_max (T *address, T value) |
Set the value to the maximum of the actual and given, returning old. | |
Atomics for use in kernel code (CUDA/HIP/OpenMP).
CELER_FORCEINLINE_FUNCTION T celeritas::atomic_add | ( | T * | address, |
T | value | ||
) |
Add to a value, returning the original value.
Note that on CPU, this assumes the atomic add is being done in with track-level parallelism rather than event-level because these utilities are meant for "kernel" code.