DASH  0.3.0
dash::GlobAsyncRef< dash::Atomic< T > > Class Template Reference

Specialization for atomic values. More...

#include <GlobAtomicAsyncRef.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 atomic_t = dash::Atomic< T >
 
using const_atomic_t = typename dash::Atomic< const_value_type >
 
using nonconst_atomic_t = typename dash::Atomic< nonconst_value_type >
 
using self_t = GlobAsyncRef< atomic_t >
 
using const_type = GlobAsyncRef< const_atomic_t >
 
using nonconst_type = GlobAsyncRef< dash::Atomic< nonconst_value_type > >
 

Public Member Functions

 GlobAsyncRef ()=delete
 Reference semantics forbid declaration without definition. More...
 
 GlobAsyncRef (dart_gptr_t dart_gptr)
 Constructor, creates an GlobRef object referencing an element in global memory. More...
 
template<typename _T , int = internal::enable_implicit_copy_ctor<value_type, _T>::value>
 GlobAsyncRef (const GlobAsyncRef< dash::Atomic< _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< dash::Atomic< _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< dash::Atomic< _T >> &gref)
 
template<typename _T , long = internal::enable_explicit_copy_ctor<value_type, _T>::value>
 GlobAsyncRef (const GlobRef< dash::Atomic< _T >> &gref)
 
 GlobAsyncRef (self_t &&other)=default
 MOVE Constructor: Unlike native reference types, global reference types are moveable. More...
 
self_toperator= (const self_t &other)=delete
 Copy Assignment. More...
 
self_toperator= (self_t &&other)=default
 Move Assignment. More...
 
bool operator== (const self_t &other) const noexcept
 
bool operator!= (const self_t &other) const noexcept
 
bool operator== (const T &value) const =delete
 
bool operator!= (const T &value) const =delete
 
dart_gptr_t dart_gptr () const
 
bool is_local () const
 Checks whether the globally referenced element is in the calling unit's local memory. More...
 
operator= (const T &value) const
 atomically assigns value More...
 
void set (const T &value) const
 Set the value of the shared atomic variable. More...
 
void set (const T *ptr) const
 Set the value of the shared atomic variable. More...
 
void store (const T &value) const
 Set the value of the shared atomic variable. More...
 
void store (const T *ptr) const
 Set the value of the shared atomic variable. More...
 
get () const
 Atomically fetches the value. More...
 
void get (T *result) const
 Atomically fetches the value. More...
 
load () const
 Load the value of the shared atomic variable. More...
 
template<typename BinaryOp >
void op (BinaryOp binary_op, const T &value) const
 Atomically executes specified operation on the referenced shared value. More...
 
template<typename BinaryOp >
void fetch_op (BinaryOp binary_op, const T &value, T *result) const
 Atomic fetch-and-op operation on the referenced shared value. More...
 
void exchange (const T &value, T *result) const
 Atomically exchanges value. More...
 
void compare_exchange (const T &expected, const T &desired, T *result) const
 Atomically compares the value with the value of expected and if thosei are bitwise-equal, replaces the former with desired. More...
 
void add (const T &value) const
 DASH specific variant which is faster than fetch_add but does not return value. More...
 
void fetch_add (const T &value, T *result) const
 Atomic fetch-and-add operation on the referenced shared value. More...
 
void sub (const T &value) const
 DASH specific variant which is faster than fetch_sub but does not return value. More...
 
void fetch_sub (const T &value, T *result) const
 Atomic fetch-and-sub operation on the referenced shared value. More...
 
void multiply (const T &value) const
 DASH specific variant which is faster than fetch_mul but does not return value. More...
 
void fetch_multiply (const T &value, T *result) const
 Atomic fetch-and-multiply operation on the referenced shared value. More...
 
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 > &gref)
 

Detailed Description

template<typename T>
class dash::GlobAsyncRef< dash::Atomic< T > >

Specialization for atomic values.

All atomic operations are const as the GlobRef does not own the atomic values.

Definition at line 25 of file GlobAtomicAsyncRef.h.

Constructor & Destructor Documentation

◆ GlobAsyncRef() [1/5]

template<typename T >
dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef ( )
delete

Reference semantics forbid declaration without definition.

◆ GlobAsyncRef() [2/5]

template<typename T >
dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef ( dart_gptr_t  dart_gptr)
inlineexplicit

Constructor, creates an GlobRef object referencing an element in global memory.

Definition at line 95 of file GlobAtomicAsyncRef.h.

96  : _gptr(dart_gptr)
97  {
98  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>(dart_gptr_t)", dart_gptr);
99  }

◆ GlobAsyncRef() [3/5]

template<typename T >
template<typename _T , int = internal::enable_implicit_copy_ctor<value_type, _T>::value>
dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef ( const GlobAsyncRef< dash::Atomic< _T >> &  gref)
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 111 of file GlobAtomicAsyncRef.h.

112  : GlobAsyncRef(gref.dart_gptr())
113  { }
GlobAsyncRef()=delete
Reference semantics forbid declaration without definition.

◆ GlobAsyncRef() [4/5]

template<typename T >
template<typename _T , long = internal::enable_explicit_copy_ctor<value_type, _T>::value>
dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef ( const GlobAsyncRef< dash::Atomic< _T >> &  gref)
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 124 of file GlobAtomicAsyncRef.h.

References dash::GlobAsyncRef< T >::dart_gptr(), dash::GlobAsyncRef< T >::get(), dash::GlobAsyncRef< T >::operator=(), and dash::GlobAsyncRef< T >::operator==().

125  : GlobAsyncRef(gref.dart_gptr())
126  { }
GlobAsyncRef()=delete
Reference semantics forbid declaration without definition.

◆ GlobAsyncRef() [5/5]

template<typename T >
dash::GlobAsyncRef< dash::Atomic< T > >::GlobAsyncRef ( self_t &&  other)
default

MOVE Constructor: Unlike native reference types, global reference types are moveable.

Member Function Documentation

◆ add()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::add ( const T &  value) const
inline

DASH specific variant which is faster than fetch_add but does not return value.

Definition at line 407 of file GlobAtomicAsyncRef.h.

408  {
410  }
Reduce operands to their sum.
Definition: Operation.h:163
void op(BinaryOp binary_op, const T &value) const
Atomically executes specified operation on the referenced shared value.

◆ compare_exchange()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::compare_exchange ( const T &  expected,
const T &  desired,
T *  result 
) const
inline

Atomically compares the value with the value of expected and if thosei are bitwise-equal, replaces the former with desired.

The value before the operation will be stored to the memory location pointed to by result. The operation was succesful if (expected == *result).

The operation will be completed after a call to flush.

See also
dash::atomic::compare_exchange

Definition at line 383 of file GlobAtomicAsyncRef.h.

References dart_compare_and_swap(), and DART_OK.

386  {
387  static_assert(std::is_same<value_type, nonconst_value_type>::value,
388  "Cannot modify value referenced by GlobAsyncRef<Atomic<const T>>!");
389  DASH_LOG_DEBUG_VAR("GlobAsyncRef<Atomic>.compare_exchange()", desired);
390  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.compare_exchange", _gptr);
391  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.compare_exchange", expected);
392  DASH_LOG_TRACE_VAR(
393  "GlobAsyncRef<Atomic>.compare_exchange", typeid(desired).name());
395  _gptr,
396  &desired,
397  &expected,
398  result,
400  DASH_ASSERT_EQ(DART_OK, ret, "dart_compare_and_swap failed");
401  }
Signals success.
Definition: dart_types.h:33
Type trait for mapping to punned DART data type for reduce operations.
Definition: Types.h:104
dart_ret_t dart_compare_and_swap(dart_gptr_t gptr, const void *value, const void *compare, void *result, dart_datatype_t dtype)
Atomically replace the single value pointed to by gptr with the the value in value if it is equal to ...
dart_ret_t
Return values of functions in the DART interface.
Definition: dart_types.h:30

◆ exchange()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::exchange ( const T &  value,
T *  result 
) const
inline

Atomically exchanges value.

Definition at line 366 of file GlobAtomicAsyncRef.h.

368  {
370  }
Returns second operand.
Definition: Operation.h:218
void fetch_op(BinaryOp binary_op, const T &value, T *result) const
Atomic fetch-and-op operation on the referenced shared value.

◆ fetch_add()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::fetch_add ( const T &  value,
T *  result 
) const
inline

Atomic fetch-and-add operation on the referenced shared value.

The value before the operation will be stored into the memory location pointed to by result.

The operation will be completed after a call to flush.

Parameters
valueValue to be added to global atomic variable.
resultPointer to store result to

Definition at line 420 of file GlobAtomicAsyncRef.h.

425  {
426  fetch_op(dash::plus<nonconst_value_type>(), value, result);
427  }
Reduce operands to their sum.
Definition: Operation.h:163
void fetch_op(BinaryOp binary_op, const T &value, T *result) const
Atomic fetch-and-op operation on the referenced shared value.

◆ fetch_multiply()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::fetch_multiply ( const T &  value,
T *  result 
) const
inline

Atomic fetch-and-multiply operation on the referenced shared value.

The value before the operation will be stored into the memory location pointed to by result.

The operation will be completed after a call to flush.

Parameters
valueValue to be subtracted from global atomic variable.
resultPointer to store result to

Definition at line 472 of file GlobAtomicAsyncRef.h.

477  {
479  }
void fetch_op(BinaryOp binary_op, const T &value, T *result) const
Atomic fetch-and-op operation on the referenced shared value.
Reduce operands to their product.
Definition: Operation.h:182

◆ fetch_op()

template<typename T >
template<typename BinaryOp >
void dash::GlobAsyncRef< dash::Atomic< T > >::fetch_op ( BinaryOp  binary_op,
const T &  value,
T *  result 
) const
inline

Atomic fetch-and-op operation on the referenced shared value.

The value before the operation will be stored in result. The operation is guaranteed to be completed after a flush.

Parameters
valueValue to be added to global atomic variable.

Definition at line 343 of file GlobAtomicAsyncRef.h.

References dart_fetch_and_op(), and DART_OK.

348  {
349  static_assert(std::is_same<value_type, nonconst_value_type>::value,
350  "Cannot modify value referenced by GlobAsyncRef<Atomic<const T>>!");
351  DASH_LOG_DEBUG_VAR("GlobAsyncRef<Atomic>.fetch_op()", value);
352  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.fetch_op", _gptr);
353  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.fetch_op", typeid(value).name());
355  _gptr,
356  &value,
357  result,
359  binary_op.dart_operation());
360  DASH_ASSERT_EQ(DART_OK, ret, "dart_fetch_op failed");
361  }
Signals success.
Definition: dart_types.h:33
Type trait for mapping to punned DART data type for reduce operations.
Definition: Types.h:104
dart_ret_t
Return values of functions in the DART interface.
Definition: dart_types.h:30
dart_ret_t dart_fetch_and_op(dart_gptr_t gptr, const void *value, void *result, dart_datatype_t dtype, dart_operation_t op)
Perform an element-wise atomic update on the value of type dtype pointed to by gptr by applying the o...

◆ fetch_sub()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::fetch_sub ( const T &  value,
T *  result 
) const
inline

Atomic fetch-and-sub operation on the referenced shared value.

The value before the operation will be stored into the memory location pointed to by result.

The operation will be completed after a call to flush.

Parameters
valueValue to be subtracted from global atomic variable.
resultPointer to store result to

Definition at line 446 of file GlobAtomicAsyncRef.h.

451  {
452  fetch_op(dash::plus<nonconst_value_type>(), -value, result);
453  }
Reduce operands to their sum.
Definition: Operation.h:163
void fetch_op(BinaryOp binary_op, const T &value, T *result) const
Atomic fetch-and-op operation on the referenced shared value.

◆ flush()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::flush ( ) const
inline

Flush all pending asynchronous operations on this asynchronous reference.

Definition at line 484 of file GlobAtomicAsyncRef.h.

References dart_flush(), and DART_OK.

485  {
486  DASH_ASSERT_RETURNS(
487  dart_flush(_gptr),
488  DART_OK
489  );
490  }
Signals success.
Definition: dart_types.h:33
dart_ret_t dart_flush(dart_gptr_t gptr)
Guarantee completion of all outstanding operations involving a segment on a certain unit...

◆ get() [1/2]

template<typename T >
T dash::GlobAsyncRef< dash::Atomic< T > >::get ( ) const
inline

Atomically fetches the value.

The operation blocks until the value is available. However, previous un-flushed operations are not serialized.

Definition at line 264 of file GlobAtomicAsyncRef.h.

References dart_fetch_and_op(), dart_flush_local(), DART_OK, and DART_OP_NO_OP.

265  {
266  DASH_LOG_DEBUG("GlobAsyncRef<Atomic>.get()");
267  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.get", _gptr);
268  nonconst_value_type nothing;
269  nonconst_value_type result;
271  _gptr,
272  &nothing,
273  &result,
275  DART_OP_NO_OP);
276  dart_flush_local(_gptr);
277  DASH_ASSERT_EQ(DART_OK, ret, "dart_accumulate failed");
278  DASH_LOG_DEBUG_VAR("GlobAsyncRef<Atomic>.get >", result);
279  return result;
280  }
Signals success.
Definition: dart_types.h:33
No operation.
Definition: dart_types.h:97
dart_ret_t dart_flush_local(dart_gptr_t gptr)
Guarantee local completion of all outstanding operations involving a segment on a certain unit...
Type trait for mapping to punned DART data type for reduce operations.
Definition: Types.h:104
dart_ret_t
Return values of functions in the DART interface.
Definition: dart_types.h:30
dart_ret_t dart_fetch_and_op(dart_gptr_t gptr, const void *value, void *result, dart_datatype_t dtype, dart_operation_t op)
Perform an element-wise atomic update on the value of type dtype pointed to by gptr by applying the o...

◆ get() [2/2]

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::get ( T *  result) const
inline

Atomically fetches the value.

The operation will return immediately and is guaranteed to be completed after a flush occured. Previous un-flushed operations are not serialized.

Definition at line 289 of file GlobAtomicAsyncRef.h.

References dart_fetch_and_op(), DART_OK, and DART_OP_NO_OP.

290  {
291  DASH_LOG_DEBUG("GlobAsyncRef<Atomic>.get()");
292  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.get", _gptr);
293  nonconst_value_type nothing;
295  _gptr,
296  &nothing,
297  result,
299  DART_OP_NO_OP);
300  DASH_ASSERT_EQ(DART_OK, ret, "dart_accumulate failed");
301  }
Signals success.
Definition: dart_types.h:33
No operation.
Definition: dart_types.h:97
Type trait for mapping to punned DART data type for reduce operations.
Definition: Types.h:104
dart_ret_t
Return values of functions in the DART interface.
Definition: dart_types.h:30
dart_ret_t dart_fetch_and_op(dart_gptr_t gptr, const void *value, void *result, dart_datatype_t dtype, dart_operation_t op)
Perform an element-wise atomic update on the value of type dtype pointed to by gptr by applying the o...

◆ is_local()

template<typename T >
bool dash::GlobAsyncRef< dash::Atomic< T > >::is_local ( ) const
inline

Checks whether the globally referenced element is in the calling unit's local memory.

Definition at line 180 of file GlobAtomicAsyncRef.h.

180  {
181  return dash::internal::is_local(_gptr);
182  }
bool is_local() const noexcept
Whether the referenced element is located in local memory.
Definition: GlobAsyncRef.h:185

◆ load()

template<typename T >
T dash::GlobAsyncRef< dash::Atomic< T > >::load ( ) const
inline

Load the value of the shared atomic variable.

The operation blocks until the value is available. However, previous un-flushed operations are not serialized.

Definition at line 309 of file GlobAtomicAsyncRef.h.

309  {
310  return get();
311  }

◆ multiply()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::multiply ( const T &  value) const
inline

DASH specific variant which is faster than fetch_mul but does not return value.

Definition at line 459 of file GlobAtomicAsyncRef.h.

460  {
462  }
Reduce operands to their product.
Definition: Operation.h:182
void op(BinaryOp binary_op, const T &value) const
Atomically executes specified operation on the referenced shared value.

◆ op()

template<typename T >
template<typename BinaryOp >
void dash::GlobAsyncRef< dash::Atomic< T > >::op ( BinaryOp  binary_op,
const T &  value 
) const
inline

Atomically executes specified operation on the referenced shared value.

Parameters
valueValue to be added to global atomic variable.

Definition at line 317 of file GlobAtomicAsyncRef.h.

References dart_accumulate_blocking_local(), and DART_OK.

321  {
322  static_assert(std::is_same<value_type, nonconst_value_type>::value,
323  "Cannot modify value referenced by GlobAsyncRef<Atomic<const T>>!");
324  DASH_LOG_DEBUG_VAR("GlobAsyncRef<Atomic>.op()", value);
325  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.op", _gptr);
326  DASH_LOG_TRACE("GlobAsyncRef<Atomic>.op", "dart_accumulate");
328  _gptr,
329  &value,
330  1,
332  binary_op.dart_operation());
333  DASH_ASSERT_EQ(DART_OK, ret, "dart_accumulate_blocking_local failed");
334  }
dart_ret_t dart_accumulate_blocking_local(dart_gptr_t gptr, const void *values, size_t nelem, dart_datatype_t dtype, dart_operation_t op)
Perform an element-wise atomic update on the values pointed to by gptr by applying the operation op w...
Signals success.
Definition: dart_types.h:33
Type trait for mapping to punned DART data type for reduce operations.
Definition: Types.h:104
dart_ret_t
Return values of functions in the DART interface.
Definition: dart_types.h:30

◆ operator=() [1/3]

template<typename T >
self_t& dash::GlobAsyncRef< dash::Atomic< T > >::operator= ( const self_t other)
delete

Copy Assignment.

◆ operator=() [2/3]

template<typename T >
self_t& dash::GlobAsyncRef< dash::Atomic< T > >::operator= ( self_t &&  other)
default

Move Assignment.

◆ operator=() [3/3]

template<typename T >
T dash::GlobAsyncRef< dash::Atomic< T > >::operator= ( const T &  value) const
inline

atomically assigns value

Returns
The assigned value.
Note
This operator does not return a reference but a copy of the value in order to ensure atomicity. This is consistent with the C++ std::atomic operator=, see http://en.cppreference.com/w/cpp/atomic/atomic/operator%3D.

Definition at line 194 of file GlobAtomicAsyncRef.h.

194  {
195  store(value);
196  return value;
197  }
void store(const T &value) const
Set the value of the shared atomic variable.

◆ set() [1/2]

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::set ( const T &  value) const
inline

Set the value of the shared atomic variable.

The operation will block until the local memory can be re-used.

Definition at line 203 of file GlobAtomicAsyncRef.h.

References dart_accumulate_blocking_local(), DART_OK, and DART_OP_REPLACE.

204  {
205  static_assert(std::is_same<value_type, nonconst_value_type>::value,
206  "Cannot modify value referenced by GlobAsyncRef<Atomic<const T>>!");
207  DASH_LOG_DEBUG_VAR("GlobAsyncRef<Atomic>.set()", value);
208  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.set", _gptr);
210  _gptr,
211  &value,
212  1,
215  DASH_ASSERT_EQ(DART_OK, ret, "dart_accumulate failed");
216  DASH_LOG_DEBUG("GlobAsyncRef<Atomic>.set >");
217  }
dart_ret_t dart_accumulate_blocking_local(dart_gptr_t gptr, const void *values, size_t nelem, dart_datatype_t dtype, dart_operation_t op)
Perform an element-wise atomic update on the values pointed to by gptr by applying the operation op w...
Signals success.
Definition: dart_types.h:33
Type trait for mapping to punned DART data type for reduce operations.
Definition: Types.h:104
dart_ret_t
Return values of functions in the DART interface.
Definition: dart_types.h:30
Replace Value.
Definition: dart_types.h:95

◆ set() [2/2]

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::set ( const T *  ptr) const
inline

Set the value of the shared atomic variable.

The operation will return immediately and the memory pointed to by ptr should not be re-used before the operation has been completed.

Definition at line 224 of file GlobAtomicAsyncRef.h.

References dart_accumulate(), DART_OK, and DART_OP_REPLACE.

225  {
226  static_assert(std::is_same<value_type, nonconst_value_type>::value,
227  "Cannot modify value referenced by GlobAsyncRef<Atomic<const T>>!");
228  DASH_LOG_DEBUG_VAR("GlobAsyncRef<Atomic>.set()", *ptr);
229  DASH_LOG_TRACE_VAR("GlobAsyncRef<Atomic>.set", _gptr);
231  _gptr,
232  ptr,
233  1,
236  DASH_ASSERT_EQ(DART_OK, ret, "dart_accumulate failed");
237  DASH_LOG_DEBUG("GlobAsyncRef<Atomic>.set >");
238  }
Signals success.
Definition: dart_types.h:33
dart_ret_t dart_accumulate(dart_gptr_t gptr, const void *values, size_t nelem, dart_datatype_t dtype, dart_operation_t op)
Perform an element-wise atomic update on the values pointed to by gptr by applying the operation op w...
Type trait for mapping to punned DART data type for reduce operations.
Definition: Types.h:104
dart_ret_t
Return values of functions in the DART interface.
Definition: dart_types.h:30
Replace Value.
Definition: dart_types.h:95

◆ store() [1/2]

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::store ( const T &  value) const
inline

Set the value of the shared atomic variable.

The operation will block until the local memory can be re-used.

Definition at line 245 of file GlobAtomicAsyncRef.h.

245  {
246  set(value);
247  }

◆ store() [2/2]

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::store ( const T *  ptr) const
inline

Set the value of the shared atomic variable.

The operation will return immediately and the memory pointed to by ptr should not be re-used before the operation has been completed.

Definition at line 254 of file GlobAtomicAsyncRef.h.

254  {
255  set(ptr);
256  }

◆ sub()

template<typename T >
void dash::GlobAsyncRef< dash::Atomic< T > >::sub ( const T &  value) const
inline

DASH specific variant which is faster than fetch_sub but does not return value.

Definition at line 433 of file GlobAtomicAsyncRef.h.

434  {
436  }
Reduce operands to their sum.
Definition: Operation.h:163
void op(BinaryOp binary_op, const T &value) const
Atomically executes specified operation on the referenced shared value.

The documentation for this class was generated from the following file: