PEARL
Parallel Event Access and Replay Library
Public Types | Static Public Attributes | Friends | List of all members
pearl::SystemNode Class Reference

Representation of a system node definition. More...

#include <pearl/SystemNode.h>

Public Types

typedef uint32_t IdType
 System node definition identifier type. More...
 

Public Member Functions

Constructors & destructor
 SystemNode (IdType id, const String &name, const String &className, SystemNode *parent)
 Constructor. More...
 
Access definition data
IdType getId () const
 Get global identifier. More...
 
const StringgetName () const
 Get node name. More...
 
const StringgetClassName () const
 Get class name. More...
 
SystemNodegetParent () const
 Get parent node. More...
 
uint32_t numChildren () const
 Get number of child nodes. More...
 
const SystemNodegetChild (uint32_t index) const
 Get child node. More...
 
uint32_t numLocationGroups () const
 Get number of location groups. More...
 
const LocationGroupgetLocationGroup (uint32_t index) const
 Get location group. More...
 

Static Public Attributes

static const IdType NO_ID = (~static_cast<IdType>(0))
 Numerical identifier used for undefined system node definitions. More...
 
static const SystemNode UNDEFINED
 Static instance of class SystemNode representing undefined system node entries in other definitions. More...
 

Friends

class LocationGroup
 

Related Functions

(Note that these are not member functions.)

Stream I/O functions
std::ostream & operator<< (std::ostream &stream, const SystemNode &item)
 Stream output operator. More...
 
Comparison operators
bool operator== (const SystemNode &lhs, const SystemNode &rhs)
 Equality operator. More...
 
bool operator!= (const SystemNode &lhs, const SystemNode &rhs)
 Inequality operator. More...
 

Detailed Description

Instances of the SystemNode class provide information about nodes in the system (i.e., hardware) hierarchy of the computing platform. That is, system nodes represent entire machines, racks, midplanes, or individual cluster nodes or node boards and can be arbitrarily nested to reflect the hardware architecture of the computing system. System nodes are characterized by a name, a free-form description ("class name"), and a parent node in the system hierarchy. In addition, one or more LocationGroup objects can be attached to a system node. The numerical identifiers of the individual nodes are globally defined and continuously enumerated, i.e., the ID is element of [0,#system_nodes-1].

Member Typedef Documentation

◆ IdType

typedef uint32_t pearl::SystemNode::IdType

Constructor & Destructor Documentation

◆ SystemNode()

pearl::SystemNode::SystemNode ( IdType  id,
const String name,
const String className,
SystemNode parent 
)

Creates a new system node definition instance and initializes it with the given values.

Parameters
idGlobal system node identifier
nameNode name
classNameFree-form class name (e.g., "machine")
parentParent node in system tree (NULL for root nodes)

Member Function Documentation

◆ getChild()

const SystemNode& pearl::SystemNode::getChild ( uint32_t  index) const

Returns the child node stored at the given index in the range of [0,#children-1].

Parameters
indexChild index
Returns
Child node

◆ getClassName()

const String& pearl::SystemNode::getClassName ( ) const

Returns the string definition storing the free-form class name of this system node. This is typically a brief description of the node type, e.g., "machine", "rack", or "node". If this information is not available, String::UNDEFINED is returned.

Returns
Class name

◆ getId()

IdType pearl::SystemNode::getId ( ) const

Returns the global identifier of the system node definition.

Returns
Global identifier

◆ getLocationGroup()

const LocationGroup& pearl::SystemNode::getLocationGroup ( uint32_t  index) const

Returns the associated location group stored at the given index in the range [0,#stored_groups-1].

Parameters
indexLocation group index
Returns
Location group

◆ getName()

const String& pearl::SystemNode::getName ( ) const

Returns the string definition storing the name of this system node. This is typically the name of the machine, rack, or cluster node. If this information is not available, String::UNDEFINED is returned.

Returns
Node name

◆ getParent()

SystemNode* pearl::SystemNode::getParent ( ) const

Returns a pointer to the parent node in the system tree if applicable. Returns NULL for root nodes.

Returns
Parent node

◆ numChildren()

uint32_t pearl::SystemNode::numChildren ( ) const

Returns the number of child nodes in the system tree.

Returns
Number of child nodes

◆ numLocationGroups()

uint32_t pearl::SystemNode::numLocationGroups ( ) const

Returns the number of associated location groups.

Returns
Number of location groups

Friends And Related Function Documentation

◆ LocationGroup

friend class LocationGroup
friend

◆ operator!=()

bool operator!= ( const SystemNode lhs,
const SystemNode rhs 
)
related

Compares two system node definition objects lhs and rhs for inequality. Two nodes are considered unequal if either their IDs, their names, class names, or their parents differ. The child nodes are not compared, i.e., this operator performs a "shallow" comparison.

Parameters
lhsLeft-hand operand
rhsRight-hand operand
Returns
True if the system node definitions differ, false otherwise.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  stream,
const SystemNode item 
)
related

Prints the contents of the given system node definition object item to an output stream in a human-readable form.

Parameters
streamOutput stream
itemSystem node definition object
Returns
Output stream

◆ operator==()

bool operator== ( const SystemNode lhs,
const SystemNode rhs 
)
related

Compares two system node definition objects lhs and rhs for equality. Two nodes are considered equal if their identifiers, names, class names, as well as their parents are identical. The child nodes are not compared, i.e., this operator performs a "shallow" comparison.

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

Member Data Documentation

◆ NO_ID

const IdType pearl::SystemNode::NO_ID = (~static_cast<IdType>(0))
static

◆ UNDEFINED

const SystemNode pearl::SystemNode::UNDEFINED
static

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