![]() |
PEARL
Parallel Event Access and Replay Library
|
Representation of a communicator definition. More...
#include <pearl/Communicator.h>
Public Types | |
enum | Paradigm { PARADIGM_UNKNOWN, PARADIGM_MPI, PARADIGM_ARMCI, PARADIGM_SHMEM, PARADIGM_GASPI, NUMBER_OF_PARADIGMS } |
Communicator paradigm. More... | |
typedef uint32_t | IdType |
Communicator definition identifier type. | |
Public Member Functions | |
IdType | getId () const |
Get global identifier. | |
const String & | getName () const |
Get communicator name. | |
const ProcessGroup & | getGroup () const |
Get associated process group. | |
Communicator * | getParent () const |
Get parent communicator. | |
Paradigm | getParadigm () const |
Get paradigm. | |
Constructors & destructor | |
Communicator (IdType id, const String &name, const ProcessGroup &group, Paradigm paradigm, Communicator *parent) | |
Constructor. | |
virtual | ~Communicator () |
Destructor. | |
Static Public Attributes | |
static const IdType | NO_ID = (~static_cast<IdType>(0)) |
Numerical identifier used for undefined communicator definitions. | |
static const Communicator | UNDEFINED |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Communicator &item) |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const Communicator &lhs, const Communicator &rhs) |
Equality operator. | |
bool | operator!= (const Communicator &lhs, const Communicator &rhs) |
Inequality operator. | |
Stream I/O functions | |
std::ostream & | operator<< (std::ostream &stream, const Communicator &item) |
Stream output operator. |
Instances of the Communicator class provide information about MPI communicators. Communicators are characterized by a name and a parent communicator as well as an associated group of processes. The numerical identifiers of the individual communicators are globally defined and continuously enumerated, i.e., the ID is element of [0,#communicators-1].
typedef uint32_t pearl::Communicator::IdType |
pearl::Communicator::Communicator | ( | IdType | id, |
const String & | name, | ||
const ProcessGroup & | group, | ||
Paradigm | paradigm, | ||
Communicator * | parent | ||
) |
Creates a new communicator definition instance and initializes it with the given values.
id | Global communicator identifier |
name | Communicator name |
group | Associated process group object |
parent | Parent communicator (NULL for root communicators or when this information is not available) |
virtual pearl::Communicator::~Communicator | ( | ) | [virtual] |
Releases all allocated resources and destroys the instance.
const ProcessGroup& pearl::Communicator::getGroup | ( | ) | const |
Returns the ProcessGroup object associated to this communicator.
IdType pearl::Communicator::getId | ( | ) | const |
Returns the global identifier of the communicator definition.
const String& pearl::Communicator::getName | ( | ) | const |
Returns the string definition storing the communicators's name. If this information is not available, String::UNDEFINED is returned.
Paradigm pearl::Communicator::getParadigm | ( | ) | const |
Returns the paradigm of the communicator. The paradigm can be used to distiguish communicators of different message passing libraries, such as MPI, ARMCI, SHMEM, etc..
Communicator* pearl::Communicator::getParent | ( | ) | const |
Returns a pointer to the parent communicator if applicable. Returns NULL for root communicators or when this information is not available.
bool operator!= | ( | const Communicator & | lhs, |
const Communicator & | rhs | ||
) | [related] |
Compares two communicator definition objects lhs and rhs for inequality. Two communicators are considered unequal if either their IDs, names, associated process groups, or parents differ.
lhs | Left-hand operand |
rhs | Right-hand operand |
std::ostream& operator<< | ( | std::ostream & | stream, |
const Communicator & | item | ||
) | [friend] |
std::ostream & operator<< | ( | std::ostream & | stream, |
const Communicator & | item | ||
) | [related] |
Prints the contents of the given communicator definition object item to an output stream in a human-readable form.
stream | Output stream |
item | Communicator definition object |
bool operator== | ( | const Communicator & | lhs, |
const Communicator & | rhs | ||
) | [related] |
Compares two communicator definition objects lhs and rhs for equality. Two communicators are considered equal if their identifiers, names, associated process groups, and parants are identical.
lhs | Left-hand operand |
rhs | Right-hand operand |
const IdType pearl::Communicator::NO_ID = (~static_cast<IdType>(0)) [static] |
const Communicator pearl::Communicator::UNDEFINED [static] |
Static instance of class Communicator representing undefined communicator 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 |