DASH
0.3.0
|
Type wrapper to mark any trivial type atomic. More...
#include <Atomic.h>
Public Types | |
typedef T | value_type |
Public Member Functions | |
constexpr | Atomic (const Atomic< T > &other)=default |
constexpr | Atomic (Atomic< T > &&other)=default |
self_t & | operator= (const self_t &other)=default |
self_t & | operator= (self_t &&other)=default |
constexpr | Atomic (T value) |
Initializes the underlying value with desired. More... | |
T | operator= (T value)=delete |
Disabled assignment as this violates the atomic semantics. More... | |
operator T ()=delete | |
As Atomic is implemented as phantom type, the value has to be queried using the dash::GlobRef . More... | |
constexpr bool | operator== (const self_t &other) const |
constexpr bool | operator!= (const self_t &other) const |
Friends | |
template<typename T_ > | |
std::ostream & | operator<< (std::ostream &os, const Atomic< T_ > &at) |
Type wrapper to mark any trivial type atomic.
If one unit writes to an atomic object while another unit reads from it, the behavior is well-defined. The DASH version follows as closely as possible the interface of std::atomic
However as data has to be transferred between units using DART, the atomicity guarantees are set by the DART implementation.
Atomic
objects have to be placed in a DASH container, and can only be accessed using GlobRef<dash::Atomic<T>>
. Local accesses to atomic elements are not allowed.Definition at line 15 of file GlobAtomicAsyncRef.h.
|
inline |
Initializes the underlying value with desired.
The initialization is not atomic
Definition at line 73 of file Atomic.h.
References dash::typestr().
|
delete |
As Atomic
is implemented as phantom type, the value has to be queried using the dash::GlobRef
.
|
delete |