![]() |
PEARL
Parallel Event Access and Replay Library
|
Grouping set definition representation for a set of Location definition objects. More...
#include <pearl/LocationSet.h>
Public Member Functions | |
Constructors & destructor | |
LocationSet (IdType id, const String &name, const std::vector< const Location * > &members) | |
Constructor. More... | |
Query functions | |
virtual SetType | getType () const |
Get grouping set type. More... | |
std::size_t | numLocations () const |
Get number of locations. More... | |
const Location & | getLocation (std::size_t rank) const |
Get location by rank. More... | |
![]() | |
IdType | getId () const |
Get global identifier. More... | |
const String & | getName () const |
Get grouping set name. More... | |
virtual | ~GroupingSet () |
Destructor. More... | |
The LocationSet class provides a specialized grouping set definition representation for an ordered set of Location definition objects. Note that a LocationSet does not take ownership of the provided Location definition objects. Thus, care has to be taken with respect to the deletion and lifetime of the referenced Location objects.
pearl::LocationSet::LocationSet | ( | IdType | id, |
const String & | name, | ||
const std::vector< const Location * > & | members | ||
) |
Constructs a new instance with the given global identifier id
, location set name
, and a members
vector providing an ordered list of Location definition objects defining the set.
id | Global grouping set identifier |
name | Location set name |
members | List of Location definition objects defining the set \n@par Exception safety\n <b class="paramname">Strong guarantee:</b> no effects in case an exception is thrown. <br>\n |
std::bad_alloc | on failure to allocate storage |
const Location& pearl::LocationSet::getLocation | ( | std::size_t | rank | ) | const |
Returns a constant reference to the Location definition object with the given rank
.
rank | Local rank in the range [0,#num_locations-1]. |
\n@par Exception safety\n <b class="paramname">Strong guarantee:</b> no effects in case an exception is thrown. <br>\n
pearl::RuntimeError | if rank is out of bounds |
|
virtual |
Returns the type of the grouping set.
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
Implements pearl::GroupingSet.
Reimplemented in pearl::CommLocationSet.
std::size_t pearl::LocationSet::numLocations | ( | ) | const |
![]() |
Copyright © 1998–2019 Forschungszentrum Jülich GmbH,
Jülich Supercomputing Centre
Copyright © 2009–2015 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming |