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

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. More...
 

Public Member Functions

Access definition data
IdType getId () const
 Get global identifier. More...
 
const StringgetName () const
 Get location group name. More...
 
virtual Type getType () const =0
 Get location group type. More...
 
SystemNodegetParent () const
 Get parent node. More...
 
uint32_t numLocations () const
 Get number of locations. More...
 
const LocationgetLocation (uint32_t index) const
 Get location. More...
 

Static Public Attributes

static const IdType NO_ID = (~static_cast<IdType>(0))
 Numerical identifier used for undefined loction group definitions. More...
 

Friends

class Location
 
std::ostream & operator<< (std::ostream &stream, const LocationGroup &item)
 

Related Functions

(Note that these are not member functions.)

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

Constructors & destructor

virtual ~LocationGroup ()
 Destructor. More...
 
 LocationGroup (IdType id, const String &name, SystemNode *parent)
 Constructor. More...
 

Detailed Description

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].

Member Typedef Documentation

◆ IdType

typedef uint32_t pearl::LocationGroup::IdType

Member Enumeration Documentation

◆ Type

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

Enumerator
TYPE_UNKNOWN 

Unknown type, used only if no other type fits.

TYPE_PROCESS 

Location group referring to an UNIX/MPI process

NUMBER_OF_TYPES 

Not a valid type, for internal use only.

Constructor & Destructor Documentation

◆ ~LocationGroup()

virtual pearl::LocationGroup::~LocationGroup ( )
virtual

Releases all allocated resources and destroys the instance.

◆ LocationGroup()

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.

Parameters
idGlobal location group identifier
nameGroup name
parentParent node in system tree (non-NULL)

Member Function Documentation

◆ getId()

IdType pearl::LocationGroup::getId ( ) const

Returns the global identifier of the location group definition.

Returns
Global identifier

◆ getLocation()

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].

Parameters
indexLocation index
Returns
Location

◆ getName()

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.

Returns
Location group name

◆ getParent()

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

Returns a pointer to the parent node in the system tree.

Returns
Parent node

◆ getType()

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.

Returns
Location group type

◆ numLocations()

uint32_t pearl::LocationGroup::numLocations ( ) const

Returns the number of associated locations.

Returns
Number of locations

Friends And Related Function Documentation

◆ Location

friend class Location
friend

◆ operator!=()

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.

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

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  stream,
const LocationGroup item 
)
friend

◆ operator<<() [2/2]

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.

Parameters
streamOutput stream
itemLocation group definition object
Returns
Output stream

◆ operator==()

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.

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

Member Data Documentation

◆ NO_ID

const IdType pearl::LocationGroup::NO_ID = (~static_cast<IdType>(0))
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