|
DASH
0.3.0
|
A Team instance specifies a subset of all available units. More...
#include <Team.h>
Classes | |
| struct | Deallocator |
| struct | iterator |
Public Types | |
| typedef struct dash::Team::iterator | iterator |
| typedef struct dash::Team::Deallocator | Deallocator |
Public Member Functions | |
| iterator | begin () |
| iterator | end () |
| Team (Team &&t) | |
| Move-constructor. More... | |
| Team & | operator= (Team &&t) |
| Move-assignment operator. More... | |
| ~Team () | |
| Destructor. More... | |
| void | register_deallocator (void *object, Deallocator::dealloc_function dealloc) |
| Register a deallocator function for a team-allocated object. More... | |
| void | unregister_deallocator (void *object, Deallocator::dealloc_function dealloc) |
| Unregister a deallocator function for a team-allocated object. More... | |
| void | free () |
| Call registered deallocator functions for all team-allocated objects. More... | |
| Team & | split (unsigned nParts) |
Split this Team's units into nParts child Team instances. More... | |
| Team & | locality_split (dash::util::Locality::Scope scope, unsigned num_parts) |
| Split this Team's units into child Team instances at the specified locality scope. More... | |
| Team & | locality_split (dart_locality_scope_t scope, unsigned num_parts) |
| Split this Team's units into child Team instances at the specified locality scope. More... | |
| bool | operator== (const Team &rhs) const |
| Equality comparison operator. More... | |
| bool | operator!= (const Team &rhs) const |
| Inequality comparison operator. More... | |
| bool | is_all () const |
| Whether this Team contains all available units. More... | |
| bool | is_null () const |
| Whether this Team is empty. More... | |
| bool | is_leaf () const |
| Whether this Team is a leaf node in a Team hierarchy, i.e. More... | |
| bool | is_root () const |
| Whether this Team is a root node in a Team hierarchy, i.e. More... | |
| bool | is_member (global_unit_t global_unit_id) const |
Whether the group associated with this Team instance contains the unit specified by global id. More... | |
| Team & | parent () |
| Team & | sub (size_t level=1) |
| Team & | bottom () |
| void | barrier () const |
| team_unit_t | myid () const |
| size_t | size () const |
| The number of units in this team. More... | |
| size_t | position () const |
| Index of this team relative to parent team. More... | |
| size_t | num_siblings () const |
| Number of sibling teams relative to parent team. More... | |
| dart_team_t | dart_id () const |
Index of this team relative to global team dash::Team::All(). More... | |
| size_t | relative_id () const |
| Index of this team relative to parent team. More... | |
| team_unit_t | relative_id (global_unit_t global_id) |
| global_unit_t | global_id (team_unit_t local_id) |
| Global unit id of specified local unit id. More... | |
Static Public Member Functions | |
| static Team & | All () |
| The invariant Team instance containing all available units. More... | |
| static global_unit_t | GlobalUnitID () |
The invariant unit ID in dash::Team::All(). More... | |
| static Team & | Null () |
| The invariant Team instance representing an undefined team. More... | |
| static Team & | Get (dart_team_t team_id) |
| Get Team instance by id. More... | |
| static void | initialize () |
| Initialize the global team. More... | |
| static void | finalize () |
| Finalize all teams. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Team &team) |
A Team instance specifies a subset of all available units.
The Team containing the set of all units is always available via dash::Team::All().
Team is a move-only type:
|
inline |
Destructor.
Recursively frees this Team instance's child teams.
Definition at line 173 of file Team.h.
References dart_group_destroy(), DART_OK, DART_TEAM_ALL, dart_team_destroy(), and free().
|
inlinestatic |
The invariant Team instance containing all available units.
Definition at line 213 of file Team.h.
Referenced by dash::Coarray< T, IndexType, Arrangement, LocalMemSpaceT >::Coarray(), finalize(), dash::GlobLocalMemoryPool< dash::HostSpace >::flush_local(), Get(), initialize(), is_all(), dash::make_team_spec(), dash::Matrix< _element_type, _rank::value, IndexType, _pattern_type >::Matrix(), MyHash< Key >::MyHash(), dash::GlobSharedRef< T, GlobalPointerType >::operator=(), dash::GlobRef< T >::operator=(), dash::io::hdf5::StoreHDF::read(), and dash::coarray::CoEventRef::test().
|
inline |
Index of this team relative to global team dash::Team::All().
Definition at line 522 of file Team.h.
Referenced by dash::List< ElementType, LocalMemorySpace >::allocate(), dash::GlobLocalMemoryPool< dash::HostSpace >::flush_local(), dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::GlobHeapMem(), dash::Shared< ElementType >::init(), dash::util::TeamLocality::parts(), and dash::io::hdf5::StoreHDF::write().
|
inlinestatic |
Finalize all teams.
Frees global memory allocated by dash::Team::All().
we cannot iterate over Team::_teams directly and destroy teams simultaneously since it will be modified on call to d'tor (possibly multiple times)
Definition at line 261 of file Team.h.
References All(), free(), and size().
|
inline |
Call registered deallocator functions for all team-allocated objects.
Definition at line 314 of file Team.h.
References dash::barrier(), locality_split(), and split().
Referenced by finalize(), operator=(), and ~Team().
|
inlinestatic |
Get Team instance by id.
Definition at line 237 of file Team.h.
References All(), DART_TEAM_ALL, and Null().
|
inline |
Global unit id of specified local unit id.
Definition at line 551 of file Team.h.
References DART_OK, dart_team_locality_finalize(), dart_team_locality_init(), dart_team_myid(), dart_team_size(), dart_team_unit_l2g(), operator==(), and dash::UNDEFINED_TEAM_UNIT_ID.
Referenced by relative_id().
|
inlinestatic |
The invariant unit ID in dash::Team::All().
Definition at line 221 of file Team.h.
References dash::myid().
|
inlinestatic |
Initialize the global team.
Definition at line 252 of file Team.h.
References All().
|
inline |
Whether this Team contains all available units.
Definition at line 397 of file Team.h.
References All(), and operator==().
|
inline |
Whether this Team is a leaf node in a Team hierarchy, i.e.
does not have any child Teams assigned.
Definition at line 414 of file Team.h.
Referenced by is_member().
|
inline |
Whether the group associated with this Team instance contains the unit specified by global id.
id.
| groupId | the id of the group to test for membership |
Definition at line 437 of file Team.h.
References dash::barrier(), dart_barrier(), dart_group_ismember(), DART_OK, is_leaf(), is_null(), dash::myid(), and Null().
|
inline |
Whether this Team is empty.
Definition at line 405 of file Team.h.
References Null(), and operator==().
Referenced by is_member().
|
inline |
| Team& dash::Team::locality_split | ( | dash::util::Locality::Scope | scope, |
| unsigned | num_parts | ||
| ) |
Split this Team's units into child Team instances at the specified locality scope.
| scope | Locality scope that determines the level in the topology hierarchy where the team is split. |
| num_parts | Number of parts to split this team's units into |
Referenced by free(), and locality_split().
|
inline |
Split this Team's units into child Team instances at the specified locality scope.
| scope | Locality scope that determines the level in the topology hierarchy where the team is split. |
| num_parts | Number of parts to split this team's units into |
Definition at line 357 of file Team.h.
References locality_split().
|
inlinestatic |
The invariant Team instance representing an undefined team.
Definition at line 229 of file Team.h.
Referenced by dash::List< ElementType, LocalMemorySpace >::allocate(), dash::Array< signal_t >::allocate(), dash::Array< signal_t >::barrier(), dash::GlobLocalMemoryPool< dash::HostSpace >::flush_local(), Get(), is_member(), is_null(), dash::util::TeamLocality::parts(), and dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::team().
|
inline |
|
inline |
Inequality comparison operator.
| rhs | The Team instance to compare |
Definition at line 389 of file Team.h.
References operator==().
Move-assignment operator.
Definition at line 152 of file Team.h.
References free().
|
inline |
Equality comparison operator.
| rhs | The Team instance to compare |
Definition at line 377 of file Team.h.
Referenced by global_id(), is_all(), is_null(), and operator!=().
|
inline |
|
inline |
Register a deallocator function for a team-allocated object.
All registered deallocators will be called in ~Team(), or explicitly using Team::free().
| object | Object to deallocate |
| dealloc | Function deallocating the object |
Definition at line 285 of file Team.h.
Referenced by dash::List< ElementType, LocalMemorySpace >::allocate().
|
inline |
Index of this team relative to parent team.
Definition at line 530 of file Team.h.
References DART_OK, dart_team_unit_g2l(), and global_id().
|
inline |
The number of units in this team.
Definition at line 498 of file Team.h.
Referenced by dash::List< ElementType, LocalMemorySpace >::allocate(), dash::List< ElementType, LocalMemorySpace >::barrier(), dash::BlockPattern< 1, Arrangement, IndexType >::BlockPattern(), dash::Coevent::Coevent(), dash::CSRPattern< 1, Arrangement, IndexType >::CSRPattern(), finalize(), dash::GlobHeapMem< ElementType, LocalMemorySpace, AllocationPolicy, LocalAlloc >::GlobHeapMem(), dash::Comutex::initialize(), dash::Coevent::initialize(), dash::List< ElementType, LocalMemorySpace >::List(), MyHash< Key >::MyHash(), dash::LoadBalancePattern< 1, CompBasedMeasure, MemBasedMeasure, Arrangement, IndexType >::ndim(), dash::CSRPattern< 1, Arrangement, IndexType >::ndim(), dash::DynamicPattern< 1, Arrangement, IndexType >::ndim(), dash::SharedCounter< ValueType >::SharedCounter(), and dash::BlockPattern< 1, Arrangement, IndexType >::underfilled_blocksize().
| Team& dash::Team::split | ( | unsigned | nParts | ) |
|
inline |
Unregister a deallocator function for a team-allocated object.
All registered deallocators will be called in ~Team(), or explicitly using Team::free().
| object | Object to deallocate |
| dealloc | Function deallocating the object |
Definition at line 300 of file Team.h.
Referenced by dash::Array< signal_t >::Array(), dash::List< ElementType, LocalMemorySpace >::deallocate(), and dash::Array< signal_t >::operator=().