PEARL
Parallel Event Access and Replay Library
List of all members
pearl::LocationSet Class Reference

Grouping set definition representation for a set of Location definition objects. More...

#include <pearl/LocationSet.h>

Inheritance diagram for pearl::LocationSet:
pearl::GroupingSet pearl::uncopyable::Uncopyable pearl::CommLocationSet

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 LocationgetLocation (std::size_t rank) const
 Get location by rank. More...
 
- Public Member Functions inherited from pearl::GroupingSet
IdType getId () const
 Get global identifier. More...
 
const StringgetName () const
 Get grouping set name. More...
 
virtual ~GroupingSet ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from pearl::GroupingSet
enum  SetType {
  LOCATION_SET,
  REGION_SET,
  METRIC_SET,
  COMM_LOCATION_SET,
  COMM_SET
}
 Grouping set types. More...
 
enum  Property {
  PROPERTY_NONE = 0,
  PROPERTY_SELF = (1 << 0),
  PROPERTY_WORLD = (1 << 1),
  PROPERTY_GLOBAL_RANKS = (1 << 2)
}
 Grouping set properties. More...
 
typedef uint32_t IdType
 Grouping set definition identifier type. More...
 
typedef Flags< Property, uint8_t > Properties
 Grouping set property flags type. More...
 
- Protected Member Functions inherited from pearl::GroupingSet
 GroupingSet (IdType id, const String &name)
 Constructor. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LocationSet()

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.

Parameters
idGlobal grouping set identifier
nameLocation set name
membersList 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
Exceptions
std::bad_allocon failure to allocate storage

Member Function Documentation

◆ getLocation()

const Location& pearl::LocationSet::getLocation ( std::size_t  rank) const

Returns a constant reference to the Location definition object with the given rank.

Parameters
rankLocal rank in the range [0,#num_locations-1].
Returns
Constant reference to the corresponding Location object
        \n@par Exception safety\n        <b class="paramname">Strong guarantee:</b>         no effects in case an exception is thrown.        <br>\n
Exceptions
pearl::RuntimeErrorif rank is out of bounds

◆ getType()

virtual SetType pearl::LocationSet::getType ( ) const
virtual

Returns the type of the grouping set.

Returns
Set type (i.e., GroupingSet::LOCATION_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.

◆ numLocations()

std::size_t pearl::LocationSet::numLocations ( ) const

Returns the number of Location definitions stored in the location set instance.

Returns
Number of Location definitions
        \n@par Exception safety\n        <b class="paramname">No-throw guarantee:</b>         never throws exceptions.        <br>\n

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

Scalasca    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