![]() |
PEARL
Parallel Event Access and Replay Library
|
Interface of location group definition representations. More...
#include <pearl/LocationGroup.h>
Public Types | |
enum | Type { TYPE_UNKNOWN, TYPE_PROCESS, NUMBER_OF_TYPES } |
Location group types. More... | |
typedef uint32_t | IdType |
Location group definition identifier type. | |
Public Member Functions | |
IdType | getId () const |
Get global identifier. | |
const String & | getName () const |
Get location group name. | |
virtual Type | getType () const =0 |
Get location group type. | |
SystemNode * | getParent () const |
Get parent node. | |
uint32_t | numLocations () const |
Get number of locations. | |
const Location & | getLocation (uint32_t index) const |
Get location. | |
Static Public Attributes | |
static const IdType | NO_ID = (~static_cast<IdType>(0)) |
Numerical identifier used for undefined loction group definitions. | |
Friends | |
class | Location |
class | SystemNode |
std::ostream & | operator<< (std::ostream &stream, const LocationGroup &item) |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const LocationGroup &lhs, const LocationGroup &rhs) |
Equality operator. | |
bool | operator!= (const LocationGroup &lhs, const LocationGroup &rhs) |
Inequality operator. | |
Stream I/O functions | |
std::ostream & | operator<< (std::ostream &stream, const LocationGroup &item) |
Stream output operator. | |
Constructors & destructor | |
virtual | ~LocationGroup () |
Destructor. | |
LocationGroup (IdType id, const String &name, SystemNode *parent) | |
Constructor. |
The abstract base class LocationGroup defines the interface of location group representations which provide information about logical (i.e., software-related) nodes in the system hierarchy, typically representing individual UNIX/MPI processes. Location groups are characterized by a name, a type, and a parent node (of type SystemNode) in the system hierarchy. In addition, one or more Location objects can be attached to a location group. The numerical identifiers of the individual location groups are globally defined and continuously enumerated, i.e., the ID is element of [0,#location_groups-1].
typedef uint32_t pearl::LocationGroup::IdType |
Every location group has a type field associated to it which encodes more specific information about the group.
virtual pearl::LocationGroup::~LocationGroup | ( | ) | [virtual] |
Releases all allocated resources and destroys the instance.
pearl::LocationGroup::LocationGroup | ( | IdType | id, |
const String & | name, | ||
SystemNode * | parent | ||
) | [protected] |
Creates a new location group definition instance and initializes it with the given values.
id | Global location group identifier |
name | Group name |
parent | Parent node in system tree (non-NULL) |
IdType pearl::LocationGroup::getId | ( | ) | const |
Returns the global identifier of the location group definition.
const Location& pearl::LocationGroup::getLocation | ( | uint32_t | index | ) | const |
Returns the associated location stored at the given index in the range [0,#stored_locations-1].
index | Location index |
const String& pearl::LocationGroup::getName | ( | ) | const |
Returns the string definition storing the location group's name. If this information is not available, String::UNDEFINED is returned.
SystemNode* pearl::LocationGroup::getParent | ( | ) | const |
Returns a pointer to the parent node in the system tree.
virtual Type pearl::LocationGroup::getType | ( | ) | const [pure virtual] |
Returns the location group type, encoding more detailed information. See the documentation of LocationGroup::Type for details.
uint32_t pearl::LocationGroup::numLocations | ( | ) | const |
Returns the number of associated locations.
friend class Location [friend] |
bool operator!= | ( | const LocationGroup & | lhs, |
const LocationGroup & | rhs | ||
) | [related] |
Compares two location group definition objects lhs and rhs for inequality. Two groups are considered unequal if either their IDs, names, types, or parents differ. The child nodes are not compared, i.e., this operator performs a "shallow" comparison.
lhs | Left-hand operand |
rhs | Right-hand operand |
std::ostream& operator<< | ( | std::ostream & | stream, |
const LocationGroup & | item | ||
) | [friend] |
std::ostream & operator<< | ( | std::ostream & | stream, |
const LocationGroup & | item | ||
) | [related] |
Prints the contents of the given location group definition object item to an output stream in a human-readable form.
stream | Output stream |
item | Location group definition object |
bool operator== | ( | const LocationGroup & | lhs, |
const LocationGroup & | rhs | ||
) | [related] |
Compares two location group definition objects lhs and rhs for equality. Two groups are considered equal if their identifiers, names, types, and parents are identical. The child nodes are not compared, i.e., this operator performs a "shallow" comparison.
lhs | Left-hand operand |
rhs | Right-hand operand |
friend class SystemNode [friend] |
const IdType pearl::LocationGroup::NO_ID = (~static_cast<IdType>(0)) [static] |
![]() |
Copyright © 1998–2014 Forschungszentrum Jülich GmbH,
Jülich Supercomputing Centre
Copyright © 2009–2014 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming |