PEARL
Parallel Event Access and Replay Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Attributes | Friends | Related Functions
pearl::Location Class Reference

Representation of a location definition. More...

#include <pearl/Location.h>

List of all members.

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 StringgetName () const
 Get location name.
Type getType () const
 Get location type.
uint64_t getNumEvents () const
 Get number of events.
LocationGroupgetParent () 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.

Detailed Description

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.


Member Typedef Documentation

typedef uint64_t pearl::Location::IdType

Member Enumeration Documentation

Every location has a type field associated to it which encodes more specific information about the location.

Enumerator:
TYPE_UNKNOWN 

Unknown type, used only if no other type fits.

TYPE_CPU_THREAD 

Location corresponds to a CPU thread

TYPE_GPU 

Location corresponds to a GPU thread

TYPE_METRIC 

Location corresponds to non-thread level metric data

NUMBER_OF_TYPES 

Not a valid type, for internal use only.


Constructor & Destructor Documentation

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.

Parameters:
idGlobal location identifier
nameLocation name
typeLocation type
numEventsNumber of events stored
parentParent location group (non-NULL)

Member Function Documentation

Returns the global identifier of the location definition.

Returns:
Global identifier

Returns the global system node identifier of the machine this location belongs to.

Returns:
Machine identifier
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.

Returns:
Location name

Returns the global system node identifier of the machine node this location belongs to.

Returns:
Node identifier
uint64_t pearl::Location::getNumEvents ( ) const

Returns the number of event records stored for this location.

Returns:
Number of events

Returns a pointer to the parent location group.

Returns:
Parent group
int pearl::Location::getRank ( ) const

Returns the MPI rank of the process. If this information is not available, -1 is returned.

Returns:
MPI rank
uint32_t pearl::Location::getThreadId ( ) const

Returns the unique thread identifier of this location within the corresponding process.

Returns:
Thread identifier

Returns the location type, encoding more detailed information. See the documentation of Location::Type for details.

Returns:
Location type

Friends And Related Function Documentation

friend class LocationGroup [friend]
bool operator!= ( const Location lhs,
const Location rhs 
) [related]

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.

Parameters:
lhsLeft-hand operand
rhsRight-hand operand
Returns:
True if the location definitions differ, false otherwise.
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.

Parameters:
streamOutput stream
itemLocation definition object
Returns:
Output stream
bool operator== ( const Location lhs,
const Location rhs 
) [related]

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.

Parameters:
lhsLeft-hand operand
rhsRight-hand operand
Returns:
True if the location definitions are equal, false otherwise.

Member Data Documentation

const IdType pearl::Location::NO_ID = (~static_cast<IdType>(0)) [static]

Static instance of class Location representing undefined location entries in other definitions.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Scalasca    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