DASH
0.3.0
|
A fortran style comutex. More...
#include <Comutex.h>
Public Member Functions | |
Comutex (Team &team=dash::Team::All()) | |
Constructor to setup and initialize an Comutex. More... | |
iterator | begin () noexcept |
const_iterator | begin () const noexcept |
iterator | end () noexcept |
const_iterator | end () const noexcept |
size_type | size () const noexcept |
void | initialize (Team &team) |
initializeds the mutexes. More... | |
Team & | team () |
reference | operator() (const int &unit) |
Operator to select mutex at given unit. More... | |
reference | operator() (const team_unit_t &unit) |
Operator to select mutex at given unit. More... | |
A fortran style comutex.
Comutex is used to ensure mutual exclusion on a certain image. The interface is similar to dash::Coarray
but does not allow local accesses. Hence it does not fulfill the DASH Container Concept.
Example:
: Use custom mutex to avoid storing the team multiple times (Each dash::Mutex
) contains the team itself.
|
inlineexplicit |
Constructor to setup and initialize an Comutex.
If dash is not initialized, use () after dash is initialized to initialize the Comutex
Definition at line 62 of file Comutex.h.
References initialize(), and dash::is_initialized().
|
inline |
initializeds the mutexes.
If they were already initialized in the Ctor, the second initialization is skipped.
Definition at line 92 of file Comutex.h.
References dash::Team::size().
Referenced by Comutex().
|
inline |
|
inline |
Operator to select mutex at given unit.
Definition at line 121 of file Comutex.h.