An opaque wrapper for MPI_Comm with a vendor-independent representation without any <mpi.h> header.
More...
#include <UPstream.H>
Public Types | |
| typedef std::intptr_t | value_type |
| Storage for MPI_Comm (as integer or pointer). | |
Public Member Functions | |
| Communicator (const Communicator &) noexcept=default | |
| Copy construct. | |
| Communicator (Communicator &&) noexcept=default | |
| Move construct. | |
| Communicator & | operator= (const Communicator &) noexcept=default |
| Copy assignment. | |
| Communicator & | operator= (Communicator &&) noexcept=default |
| Move assignment. | |
| bool | operator== (const Communicator &rhs) const noexcept |
| Test for equality. | |
| bool | operator!= (const Communicator &rhs) const noexcept |
| Test for inequality. | |
| Communicator () noexcept | |
| Default construct as MPI_COMM_NULL. | |
| Communicator (const void *p) noexcept | |
| Construct from MPI_Comm (as pointer type). | |
| Communicator (value_type val) noexcept | |
| Construct from MPI_Comm (as integer type). | |
| value_type | value () const noexcept |
| Return raw value. | |
| const void * | pointer () const noexcept |
| Return as pointer value. | |
| bool | good () const noexcept |
| True if not equal to MPI_COMM_NULL. | |
| void | reset () noexcept |
| Reset to default constructed value (MPI_COMM_NULL). | |
| int | size () const |
| The number of ranks associated with the communicator. | |
Static Public Member Functions | |
| static Communicator | lookup (int communicator=-1) |
| Transcribe internally indexed communicator to wrapped value. | |
An opaque wrapper for MPI_Comm with a vendor-independent representation without any <mpi.h> header.
The MPI standard states that MPI_Comm is always an opaque object. Generally it is either an integer (eg, mpich) or a pointer (eg, openmpi).
Definition at line 2759 of file UPstream.H.
| typedef std::intptr_t value_type |
Storage for MPI_Comm (as integer or pointer).
Definition at line 2768 of file UPstream.H.
|
defaultnoexcept |
Copy construct.
References Communicator().
Referenced by Communicator(), Communicator(), Communicator(), Communicator(), operator!=(), operator=(), operator=(), and operator==().


|
defaultnoexcept |
Move construct.
References Communicator(), and Foam::noexcept.

|
noexcept |
Default construct as MPI_COMM_NULL.
Definition at line 25 of file UPstreamCommunicator.C.
References Communicator(), Foam::noexcept, and UPstream::UPstream().

|
inlineexplicitnoexcept |
Construct from MPI_Comm (as pointer type).
Definition at line 2834 of file UPstream.H.
References Communicator(), Foam::noexcept, and p.

|
inlineexplicitnoexcept |
Construct from MPI_Comm (as integer type).
Definition at line 2842 of file UPstream.H.
References Foam::noexcept.
|
defaultnoexcept |
Copy assignment.
References Communicator(), and Foam::noexcept.

|
defaultnoexcept |
Move assignment.
References Communicator(), and Foam::noexcept.

|
inlinenoexcept |
Test for equality.
Definition at line 2810 of file UPstream.H.
References Communicator(), Foam::noexcept, and Foam::rhs().

|
inlinenoexcept |
Test for inequality.
Definition at line 2818 of file UPstream.H.
References Communicator(), and Foam::rhs().

|
static |
Transcribe internally indexed communicator to wrapped value.
Example,
| communicator | The internally indexed communicator. The default (-1) is the same as UPstream::worldComm. |
Definition at line 34 of file UPstreamCommunicator.C.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
True if not equal to MPI_COMM_NULL.
Definition at line 42 of file UPstreamCommunicator.C.
References Foam::noexcept.
|
noexcept |
Reset to default constructed value (MPI_COMM_NULL).
Definition at line 48 of file UPstreamCommunicator.C.
References Foam::noexcept.
| int size | ( | ) | const |
The number of ranks associated with the communicator.
Definition at line 52 of file UPstreamCommunicator.C.