DASH
0.3.0
|
Routines to perform atomic operations on atomics residing in the global address space. More...
Functions | |
template<typename T > | |
T | load (const dash::GlobRef< dash::Atomic< T >> &ref) |
Get the value of the shared atomic. More... | |
template<typename T > | |
void | store (const dash::GlobRef< dash::Atomic< T >> &ref, const T &value) |
Set the value of the atomic reference. More... | |
template<typename T > | |
T | exchange (const dash::GlobRef< dash::Atomic< T >> &ref, const T &value) |
Atomically sets the value of the atomic reference and returns the old value. More... | |
template<typename T > | |
bool | compare_exchange (const dash::GlobRef< dash::Atomic< T >> &ref, const T &expected, const T &desired) |
Atomically compares the value with the value of expected and if those are bitwise-equal, replaces the former with desired. More... | |
template<typename T , typename BinaryOp > | |
void | op (const dash::GlobRef< dash::Atomic< T >> &ref, const BinaryOp binary_op, const T &value) |
Atomically executes specified operation on the referenced shared value. More... | |
template<typename T , typename BinaryOp > | |
T | fetch_op (const dash::GlobRef< dash::Atomic< T >> &ref, const BinaryOp binary_op, const T &value) |
Atomic fetch-and-op operation on the referenced shared value. More... | |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, void >::type | add (const dash::GlobRef< dash::Atomic< T >> &ref, const T &value) |
Atomic add operation on the referenced shared value. More... | |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, void >::type | sub (const dash::GlobRef< dash::Atomic< T >> &ref, const T &value) |
Atomic subtract operation on the referenced shared value. More... | |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, void >::type | multiply (const dash::GlobRef< dash::Atomic< T >> &ref, const T &value) |
Atomic multiply operation on the referenced shared value. More... | |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, T >::type | fetch_add (const dash::GlobRef< dash::Atomic< T >> &ref, const T &value) |
Atomic fetch-and-add operation on the referenced shared value. More... | |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, T >::type | fetch_sub (const dash::GlobRef< dash::Atomic< T >> &ref, const T &value) |
Atomic fetch-and-sub operation on the referenced shared value. More... | |
Routines to perform atomic operations on atomics residing in the global address space.
std::enable_if< std::is_integral<T>::value, void>::type dash::atomic::add | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const T & | value | ||
) |
Atomic add operation on the referenced shared value.
Definition at line 114 of file Operation.h.
bool dash::atomic::compare_exchange | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const T & | expected, | ||
const T & | desired | ||
) |
Atomically compares the value with the value of expected and if those are bitwise-equal, replaces the former with desired.
Definition at line 66 of file Operation.h.
T dash::atomic::exchange | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const T & | value | ||
) |
Atomically sets the value of the atomic reference and returns the old value.
Definition at line 53 of file Operation.h.
std::enable_if< std::is_integral<T>::value, T>::type dash::atomic::fetch_add | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const T & | value | ||
) |
Atomic fetch-and-add operation on the referenced shared value.
value | Value to be added to global atomic variable. |
Definition at line 160 of file Operation.h.
T dash::atomic::fetch_op | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const BinaryOp | binary_op, | ||
const T & | value | ||
) |
Atomic fetch-and-op operation on the referenced shared value.
value | Value to be added to global atomic variable. |
Definition at line 98 of file Operation.h.
std::enable_if< std::is_integral<T>::value, T>::type dash::atomic::fetch_sub | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const T & | value | ||
) |
Atomic fetch-and-sub operation on the referenced shared value.
value | Value to be subtracted from global atomic variable. |
Definition at line 178 of file Operation.h.
T dash::atomic::load | ( | const dash::GlobRef< dash::Atomic< T >> & | ref | ) |
Get the value of the shared atomic.
Definition at line 34 of file Operation.h.
std::enable_if< std::is_integral<T>::value, void>::type dash::atomic::multiply | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const T & | value | ||
) |
Atomic multiply operation on the referenced shared value.
Definition at line 142 of file Operation.h.
void dash::atomic::op | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const BinaryOp | binary_op, | ||
const T & | value | ||
) |
Atomically executes specified operation on the referenced shared value.
value | Value to be added to global atomic variable. |
Definition at line 80 of file Operation.h.
void dash::atomic::store | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const T & | value | ||
) |
Set the value of the atomic reference.
Definition at line 42 of file Operation.h.
std::enable_if< std::is_integral<T>::value, void>::type dash::atomic::sub | ( | const dash::GlobRef< dash::Atomic< T >> & | ref, |
const T & | value | ||
) |
Atomic subtract operation on the referenced shared value.
Definition at line 128 of file Operation.h.