Atomic operations
- group NVCV_CPP_CUDATOOLS_ATOMICS
Functions
- template<typename T, class OP, class = Require<std::is_floating_point_v<T>>> __device__ void AtomicOp (T *address, T val, OP op)
Metafunction to do a generic atomic operation in floating-point types.
- Template Parameters
T – Type of the values used in the atomic operation.
OP – Operation class that defines the operator call to be used as atomics.
- Parameters
address – [inout] First value to be used in the atomic operation.
val – [in] Second value to be used.
op – [in] Operation to be used.
- template<typename T> inline __device__ void AtomicMin (T &a, T b)
Metafunction to do a atomic minimum operation that accepts floating-point types.
- Template Parameters
T – Type of the values used in the atomic operation.
- Parameters
a – [inout] First value to be used in the atomic operation.
b – [in] Second value to be used.
- template<typename T> inline __device__ void AtomicMax (T &a, T b)
Metafunction to do a atomic maximum operation that accepts floating-point types.
- Template Parameters
T – Type of the values used in the atomic operation.
- Parameters
a – [inout] First value to be used in the atomic operation.
b – [in] Second value to be used.