![]() |
PEARL
Parallel Event Access and Replay Library
|
Representation of a location definition. More...
#include <pearl/Location.h>
Public Types | |
enum | Type { TYPE_UNKNOWN, TYPE_CPU_THREAD, TYPE_GPU, TYPE_METRIC, NUMBER_OF_TYPES } |
Location types. More... | |
typedef uint64_t | IdType |
Location definition identifier type. More... | |
Public Member Functions | |
Constructors & destructor | |
Location (IdType id, const String &name, Type type, uint64_t numEvents, LocationGroup *parent) | |
Constructor. More... | |
Access definition data | |
IdType | getId () const |
Get global identifier. More... | |
const String & | getName () const |
Get location name. More... | |
Type | getType () const |
Get location type. More... | |
uint64_t | getNumEvents () const |
Get number of events. More... | |
LocationGroup * | getParent () const |
Get parent node. More... | |
Access location properties | |
SystemNode::IdType | getMachineId () const |
Get machine identifier. More... | |
SystemNode::IdType | getNodeId () const |
Get node identifier. More... | |
int | getRank () const |
Get process rank. More... | |
uint32_t | getThreadId () const |
Get thread identifier. More... | |
Static Public Attributes | |
static const IdType | NO_ID = (~static_cast<IdType>(0)) |
Numerical identifier used for undefined location definitions. More... | |
static const Location | UNDEFINED |
Static instance of class Location representing undefined location entries in other definitions. More... | |
Related Functions | |
(Note that these are not member functions.) | |
Stream I/O functions | |
std::ostream & | operator<< (std::ostream &stream, const Location &item) |
Stream output operator. More... | |
Comparison operators | |
bool | operator== (const Location &lhs, const Location &rhs) |
Equality operator. More... | |
bool | operator!= (const Location &lhs, const Location &rhs) |
Inequality operator. More... | |
Instances of the Location class provide information about the leaf nodes in the system hierarchy for which actual event trace data exists. A location therefore either represents a stream of execution on either a CPU or GPU, or a stream of metric values related to the system tree node to which the parent location group is attached. Locations are characterized by a name, a type, the number of stored events, and the parent location group. The numerical identifiers of the individual locations are globally defined, but not necessarily continuously enumerated.
typedef uint64_t pearl::Location::IdType |
Every location has a type field associated to it which encodes more specific information about the location.
pearl::Location::Location | ( | IdType | id, |
const String & | name, | ||
Type | type, | ||
uint64_t | numEvents, | ||
LocationGroup * | parent | ||
) |
Creates a new location definition instance and initializes it with the given values.
id | Global location identifier |
name | Location name |
type | Location type |
numEvents | Number of events stored |
parent | Parent location group (non-NULL) |
IdType pearl::Location::getId | ( | ) | const |
Returns the global identifier of the location definition.
SystemNode::IdType pearl::Location::getMachineId | ( | ) | const |
Returns the global system node identifier of the machine this location belongs to.
const String& pearl::Location::getName | ( | ) | const |
Returns the string definition storing the location's name. If this information is not available, String::UNDEFINED is returned.
SystemNode::IdType pearl::Location::getNodeId | ( | ) | const |
Returns the global system node identifier of the machine node this location belongs to.
uint64_t pearl::Location::getNumEvents | ( | ) | const |
Returns the number of event records stored for this location.
LocationGroup* pearl::Location::getParent | ( | ) | const |
Returns a pointer to the parent location group.
int pearl::Location::getRank | ( | ) | const |
Returns the MPI rank of the process. If this information is not available, -1 is returned.
uint32_t pearl::Location::getThreadId | ( | ) | const |
Returns the unique thread identifier of this location within the corresponding process.
Type pearl::Location::getType | ( | ) | const |
Returns the location type, encoding more detailed information. See the documentation of Location::Type for details.
Compares two location definition objects lhs and rhs for inequality. Two location definitions are considered unequal if either their global identifiers, names, types, or parents differ. The number of events is not considered.
lhs | Left-hand operand |
rhs | Right-hand operand |
|
related |
Prints the contents of the given location definition object item to an output stream in a human-readable form.
stream | Output stream |
item | Location definition object |
Compares two location definition objects lhs and rhs for equality. Two location definitions are considered equal if their global identifiers, names, types, and parents are identical. The number of events is not considered.
lhs | Left-hand operand |
rhs | Right-hand operand |
|
static |
![]() |
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 |