Representation of a communicator definition.
More...
#include <pearl/Communicator.h>
Instances of the Communicator definition class provide information about communication contexts. Communicators are characterized by an identifier, a name, a parent communicator, and an associated group of locations (the communication set).
◆ IdType
◆ Communicator()
Creates a new instance with the given global identifier id
, communicator name
, associated communication set commSet
, and a parent
communicator.
- Parameters
-
id | Global communicator identifier |
name | Communicator name |
commSet | Associated communication set |
parent | Parent communicator (nullptr for root communicators or when this information is not available) \n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
|
◆ ~Communicator()
virtual pearl::Communicator::~Communicator |
( |
| ) |
|
|
virtual |
Destroys the communicator instance.
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
◆ getCommSet()
const CommSet& pearl::Communicator::getCommSet |
( |
| ) |
const |
Returns a constant reference to the associated communication set.
- Returns
- Associated communication set
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
◆ getId()
IdType pearl::Communicator::getId |
( |
| ) |
const |
Returns the global identifier of the communicator definition.
- Returns
- Global identifier
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
◆ getName()
const String& pearl::Communicator::getName |
( |
| ) |
const |
Returns a constant reference to the string definition storing the communicators's name. If this information is not available, String::UNDEFINED is returned.
- Returns
- Communicator name
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
◆ getParadigm()
Paradigm pearl::Communicator::getParadigm |
( |
| ) |
const |
Returns the paradigm associated to this communicator.
- Returns
- Communication paradigm
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
◆ getParent()
const Communicator* pearl::Communicator::getParent |
( |
| ) |
const |
Returns a pointer to the parent communicator if applicable. Returns nullptr
for root communicators or when this information is not available.
- Returns
- Parent communicator
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
◆ getSize()
uint32_t pearl::Communicator::getSize |
( |
| ) |
const |
Returns the size of this communicator (i.e., the number of ranks in the associated communication set).
- Returns
- Communicator size
\n@par Exception safety\n <b class="paramname">No-throw guarantee:</b> never throws exceptions. <br>\n
◆ operator!=()
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.
- Parameters
-
lhs | Left-hand operand |
rhs | Right-hand operand |
- Returns
- True if the communicator definitions differ, false otherwise.
◆ operator<<()
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.
- Parameters
-
- Returns
- Output stream
◆ operator==()
Compares two communicator definition objects lhs and rhs for equality. Two communicators are considered equal if their identifiers, names, associated process groups, and parents are identical.
- Parameters
-
lhs | Left-hand operand |
rhs | Right-hand operand |
- Returns
- True if the communicator definitions are equal, false otherwise.
◆ NO_ID
const IdType pearl::Communicator::NO_ID = (~static_cast< IdType >(0)) |
|
static |
◆ UNDEFINED
The documentation for this class was generated from the following file: