DASH
0.3.0
|
Global value reference for asynchronous / non-blocking operations. More...
#include <GlobAsyncRef.h>
Public Types | |
using | value_type = T |
using | const_value_type = typename std::add_const< T >::type |
using | nonconst_value_type = typename std::remove_const< T >::type |
using | self_t = GlobAsyncRef< T > |
using | const_type = GlobAsyncRef< const_value_type > |
using | nonconst_type = GlobAsyncRef< nonconst_value_type > |
Public Member Functions | |
GlobAsyncRef (dart_gptr_t dart_gptr) | |
Conctructor, creates an GlobRefAsync object referencing an element in global memory. More... | |
template<typename _T , int = internal::enable_implicit_copy_ctor<value_type, _T>::value> | |
GlobAsyncRef (const GlobAsyncRef< _T > &gref) | |
Copy constructor, implicit if at least one of the following conditions is satisfied: 1) value_type and _T are exactly the same types (including const and volatile qualifiers 2) value_type and _T are the same types after removing const and volatile qualifiers and value_type itself is const. More... | |
template<typename _T , long = internal::enable_explicit_copy_ctor<value_type, _T>::value> | |
GlobAsyncRef (const GlobAsyncRef< _T > &gref) | |
Copy constructor, explicit if the following conditions are satisfied. More... | |
template<typename _T , int = internal::enable_implicit_copy_ctor<value_type, _T>::value> | |
GlobAsyncRef (const GlobRef< _T > &gref) | |
template<typename _T , long = internal::enable_explicit_copy_ctor<value_type, _T>::value> | |
GlobAsyncRef (const GlobRef< _T > &gref) | |
GlobAsyncRef (self_t &&other)=default | |
self_t & | operator= (self_t &&other)=default |
MOVE Assignment. More... | |
self_t & | operator= (const self_t &other)=delete |
Copy Assignment. More... | |
bool | is_local () const noexcept |
Whether the referenced element is located in local memory. More... | |
template<typename MEMTYPE > | |
GlobAsyncRef< typename internal::add_const_from_type< T, MEMTYPE >::type > | member (size_t offs) const |
Get a global ref to a member of a certain type at the specified offset. More... | |
template<class MEMTYPE , class P = T> | |
GlobAsyncRef< typename internal::add_const_from_type< T, MEMTYPE >::type > | member (const MEMTYPE P::*mem) const |
Get the member via pointer to member. More... | |
nonconst_value_type | get () const |
Return the value referenced by this GlobAsyncRef . More... | |
void | get (nonconst_value_type *tptr) const |
Asynchronously write the value referenced by this GlobAsyncRef into tptr . More... | |
void | get (nonconst_value_type &tref) const |
Asynchronously write the value referenced by this GlobAsyncRef into tref . More... | |
void | set (const_value_type *tptr) const |
Asynchronously set the value referenced by this GlobAsyncRef to the value pointed to by tptr . More... | |
void | set (const_value_type &new_value) const |
Asynchronously set the value referenced by this GlobAsyncRef to the value pointed to by new_value . More... | |
const self_t & | operator= (const_value_type &new_value) const |
Value assignment operator, calls non-blocking put. More... | |
dart_gptr_t | dart_gptr () const |
Returns the underlying DART global pointer. More... | |
template<class ValueT > | |
bool | operator== (const GlobAsyncRef< ValueT > &other)=delete |
Disallow implicit comparison with other global references. More... | |
template<class ValueT > | |
bool | operator!= (const GlobAsyncRef< ValueT > &other)=delete |
void | flush () const |
Flush all pending asynchronous operations on this asynchronous reference. More... | |
Friends | |
template<typename U > | |
std::ostream & | operator<< (std::ostream &os, const GlobAsyncRef< U > &gar) |
void | swap (self_t &a, self_t &b) |
Swap values with synchronous reads and asynchronous writes. More... | |
Global value reference for asynchronous / non-blocking operations.
Example:
Definition at line 17 of file GlobAtomicRef.h.
|
inlineexplicit |
Conctructor, creates an GlobRefAsync object referencing an element in global memory.
dart_gptr | Pointer to referenced object in global memory |
Definition at line 118 of file GlobAsyncRef.h.
|
inline |
Copy constructor, implicit if at least one of the following conditions is satisfied: 1) value_type and _T are exactly the same types (including const and volatile qualifiers 2) value_type and _T are the same types after removing const and volatile qualifiers and value_type itself is const.
Definition at line 134 of file GlobAsyncRef.h.
|
inlineexplicit |
Copy constructor, explicit if the following conditions are satisfied.
1) value_type and _T are the same types after excluding const and volatile qualifiers 2) value_type is const and _T is non-const
Definition at line 147 of file GlobAsyncRef.h.
References dash::GlobAsyncRef< T >::operator=().
|
inline |
Returns the underlying DART global pointer.
Definition at line 302 of file GlobAsyncRef.h.
References dash::GlobAsyncRef< T >::operator==().
Referenced by dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef(), and dash::GlobRef< T >::GlobRef().
|
inline |
Flush all pending asynchronous operations on this asynchronous reference.
Definition at line 318 of file GlobAsyncRef.h.
References dart_flush(), and DART_OK.
|
inline |
Return the value referenced by this GlobAsyncRef
.
This operation will block until the value has been transfered.
Definition at line 226 of file GlobAsyncRef.h.
Referenced by dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef().
|
inline |
Asynchronously write the value referenced by this GlobAsyncRef
into tptr
.
This operation is guaranteed to be complete after a call to flush, at which point the referenced value can be used.
Definition at line 239 of file GlobAsyncRef.h.
|
inline |
Asynchronously write the value referenced by this GlobAsyncRef
into tref
.
This operation is guaranteed to be complete after a call to flush, at which point the referenced value can be used.
Definition at line 249 of file GlobAsyncRef.h.
|
inlinenoexcept |
Whether the referenced element is located in local memory.
Definition at line 185 of file GlobAsyncRef.h.
|
inline |
Get a global ref to a member of a certain type at the specified offset.
Definition at line 196 of file GlobAsyncRef.h.
|
inline |
Get the member via pointer to member.
Definition at line 205 of file GlobAsyncRef.h.
|
default |
MOVE Assignment.
Referenced by dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef(), and dash::GlobAsyncRef< T >::GlobAsyncRef().
|
delete |
Copy Assignment.
|
inline |
Value assignment operator, calls non-blocking put.
This operation is guaranteed to be complete after a call to flush, but the value referenced by new_value
can be re-used immediately.
Definition at line 293 of file GlobAsyncRef.h.
|
delete |
Disallow implicit comparison with other global references.
Referenced by dash::GlobAsyncRef< T >::dart_gptr(), and dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef().
|
inline |
Asynchronously set the value referenced by this GlobAsyncRef
to the value pointed to by tptr
.
This operation is guaranteed to be complete after a call to flush and the pointer tptr
should not be reused before completion.
Definition at line 259 of file GlobAsyncRef.h.
|
inline |
Asynchronously set the value referenced by this GlobAsyncRef
to the value pointed to by new_value
.
This operation is guaranteed to be complete after a call to flush, but the value referenced by new_value
can be re-used immediately.
Definition at line 273 of file GlobAsyncRef.h.
Swap values with synchronous reads and asynchronous writes.
Definition at line 214 of file GlobAsyncRef.h.