DASH
0.3.0
|
A fortran style coevent. More...
#include <Coevent.h>
Public Types | |
using | iterator = coarray::CoEventIter |
using | const_iterator = coarray::CoEventIter |
using | reference = coarray::CoEventRef |
using | size_type = int |
Public Member Functions | |
Coevent (Team &team=dash::Team::All()) | |
Constructor to setup and initialize an Coevent. More... | |
iterator | begin () DASH_NOEXCEPT |
const_iterator | begin () const DASH_NOEXCEPT |
iterator | end () |
const_iterator | end () const |
size_type | size () const |
void | wait (int count=1) |
wait for a given number of incoming events. More... | |
int | test () |
void | initialize (Team &team=dash::Team::All()) |
initializes the Coevent. More... | |
Team & | team () |
reference | operator() (const int &unit) |
Operator to select event at given unit. More... | |
reference | operator() (const team_unit_t &unit) |
Operator to select event at given unit. More... | |
A fortran style coevent.
Coevent can be used for point-to-point synchronization. Events can be posted to any image. Waiting on non-local events is not supported.
Example:
|
inlineexplicit |
Constructor to setup and initialize an Coevent.
Definition at line 66 of file Coevent.h.
References dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::begin(), dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::end(), initialize(), dash::is_initialized(), and dash::Team::size().
|
inline |
initializes the Coevent.
If it was already initialized in the Ctor, the second initialization is skipped.
Definition at line 138 of file Coevent.h.
References dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::allocate(), dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::barrier(), dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::begin(), dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::end(), dash::fill(), and dash::Team::size().
Referenced by Coevent().
|
inline |
Operator to select event at given unit.
Definition at line 155 of file Coevent.h.
|
inline |
Operator to select event at given unit.
Definition at line 164 of file Coevent.h.
|
inline |
wait for a given number of incoming events.
This function is thread-safe
Definition at line 112 of file Coevent.h.
References dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::at(), and dash::Array< ElementType, IndexType, PatternType, LocalMemSpaceT >::begin().