Location Class Reference
[PEARL.base]

Stores the information that uniquely identifies a location in the system hierarchy. More...

#include <Location.h>

Inheritance diagram for Location:

IdObject

List of all members.

Public Member Functions

Constructors & destructor
 Location (ident_t id, Machine *machine, Node *node, Process *process, Thread *thread)
Get location information
Machineget_machine () const
Nodeget_node () const
Processget_process () const
Threadget_thread () const

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &stream, const Location &item)


Detailed Description

Instances of the class Location provide information about a specific location in the system hierarchy. A location is a tuple consisting of a Machine, a Node, a Process, and a Thread. There is a one-to-one mapping between locations and threads, but a location additionally provides direct access to the upper levels of the system hierarchy.

The numerical identifiers of the individual locations are globally defined and continuously enumerated, i.e., the ID is element of [0,#locations-1].

Note:
The Machine, Node, Process, and Thread objects associated to a location are only referenced and not owned by the corresponding Location object. Therefore, they will not be deleted if the Location object is released.

Constructor & Destructor Documentation

Location ( ident_t  id,
Machine machine,
Node node,
Process process,
Thread thread 
)

Creates a new instance and initializes it with the given values. In addition, the cross-references between the different entities in the system hierarchy are created.

Parameters:
id Location identifier
machine Machine the node belongs to
node Node the process is running on
process Process the thread belongs to
thread Thread corresponding to the location


Member Function Documentation

Machine * get_machine (  )  const

Returns the machine this location belongs to.

Returns:
Associated machine

Node * get_node (  )  const

Returns the node this location belongs to.

Returns:
Associated node

Process * get_process (  )  const

Returns the process this location belongs to.

Returns:
Associated process

Thread * get_thread (  )  const

Returns the thread this location corresponds to.

Returns:
Corresponding thread


Friends And Related Function Documentation

ostream & operator<< ( std::ostream &  stream,
const Location item 
) [related]

Writes the location information stored for the given item consisting of the machine, node, process, and thread (including IDs and names) to the output stream stream.

Parameters:
stream Output stream
item Location instance
Returns:
Output stream


SCALASCA    Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre