![]() |
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. | |
Public Member Functions | |
IdType | getId () const |
Get global identifier. | |
const String & | getName () const |
Get location name. | |
Type | getType () const |
Get location type. | |
uint64_t | getNumEvents () const |
Get number of events. | |
LocationGroup * | getParent () const |
Get parent node. | |
SystemNode::IdType | getMachineId () const |
Get machine identifier. | |
SystemNode::IdType | getNodeId () const |
Get node identifier. | |
int | getRank () const |
Get process rank. | |
uint32_t | getThreadId () const |
Get thread identifier. | |
Constructors & destructor | |
Location (IdType id, const String &name, Type type, uint64_t numEvents, LocationGroup *parent) | |
Constructor. | |
Static Public Attributes | |
static const IdType | NO_ID = (~static_cast<IdType>(0)) |
Numerical identifier used for undefined location definitions. | |
static const Location | UNDEFINED |
Friends | |
class | LocationGroup |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const Location &lhs, const Location &rhs) |
Equality operator. | |
bool | operator!= (const Location &lhs, const Location &rhs) |
Inequality operator. | |
Stream I/O functions | |
std::ostream & | operator<< (std::ostream &stream, const Location &item) |
Stream output operator. |
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.
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.
friend class LocationGroup [friend] |
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 |
std::ostream & operator<< | ( | std::ostream & | stream, |
const Location & | item | ||
) | [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 |
const IdType pearl::Location::NO_ID = (~static_cast<IdType>(0)) [static] |
const Location pearl::Location::UNDEFINED [static] |
Static instance of class Location representing undefined location entries in other definitions.
![]() |
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 |