preCICE v3.1.2
|
#include <Parallel.hpp>
Public Member Functions | |
Construction and Destruction | |
CommState ()=default | |
CommState (const CommState &)=delete | |
CommState & | operator= (const CommState &)=delete |
CommState (CommState &&) noexcept | |
BEGIN CommState. | |
CommState & | operator= (CommState &&) noexcept |
~CommState () noexcept | |
Frees the communicator if allowed. | |
Communicator Access | |
Rank | rank () const |
Returns the current rank in comm. | |
int | size () const |
Returns size of comm. | |
bool | isNull () const |
Returns weather the comm is NULL. | |
Misc | |
void | synchronize () const |
void | print (std::ostream &out) const |
pretty printer for comms | |
Static Public Member Functions | |
Factory functions | |
static CommStatePtr | world () |
returns a commstate containing MPI_COMM_WORLD | |
static CommStatePtr | null () |
returns an blank commstate representing MPI_COMM_NULL | |
static CommStatePtr | self () |
returns the commstate representing MPI_COMM_SELF | |
static CommStatePtr | fromComm (Communicator comm) |
returns the commstate representing comm | |
static CommStatePtr | fromExtern (Communicator comm) |
Public Attributes | |
Communicator | comm = MPI_COMM_NULL |
The native communicator that represents this state. | |
CommStatePtr | parent = nullptr |
A shared pointer to the parent CommState. | |
bool | _owning = true |
Whether this state owns the communicator and has to free it. | |
Represents a Communicator state based on a parent state An object of this type owns it communicator and will free it at the end of its lifetime. It also owns the CommState it originated from (parent) via shared ownership.
Definition at line 41 of file Parallel.hpp.
|
default |
|
delete |
|
noexcept |
BEGIN CommState.
Definition at line 25 of file Parallel.cpp.
|
noexcept |
Frees the communicator if allowed.
Definition at line 42 of file Parallel.cpp.
|
static |
returns the commstate representing comm
Definition at line 112 of file Parallel.cpp.
|
static |
returns the commstate representing an extern comm
Definition at line 119 of file Parallel.cpp.
bool precice::utils::Parallel::CommState::isNull | ( | ) | const |
Returns weather the comm is NULL.
Definition at line 80 of file Parallel.cpp.
|
static |
returns an blank commstate representing MPI_COMM_NULL
Definition at line 98 of file Parallel.cpp.
|
noexcept |
Definition at line 33 of file Parallel.cpp.
void precice::utils::Parallel::CommState::print | ( | std::ostream & | out | ) | const |
pretty printer for comms
Definition at line 127 of file Parallel.cpp.
int precice::utils::Parallel::CommState::rank | ( | ) | const |
Returns the current rank in comm.
Definition at line 51 of file Parallel.cpp.
|
static |
returns the commstate representing MPI_COMM_SELF
Definition at line 103 of file Parallel.cpp.
int precice::utils::Parallel::CommState::size | ( | ) | const |
Returns size of comm.
Definition at line 60 of file Parallel.cpp.
void precice::utils::Parallel::CommState::synchronize | ( | ) | const |
Synchronizes all processes in the communicator
Definition at line 70 of file Parallel.cpp.
|
static |
returns a commstate containing MPI_COMM_WORLD
Definition at line 89 of file Parallel.cpp.
bool precice::utils::Parallel::CommState::_owning = true |
Whether this state owns the communicator and has to free it.
Definition at line 49 of file Parallel.hpp.
Communicator precice::utils::Parallel::CommState::comm = MPI_COMM_NULL |
The native communicator that represents this state.
Definition at line 43 of file Parallel.hpp.
CommStatePtr precice::utils::Parallel::CommState::parent = nullptr |
A shared pointer to the parent CommState.
Definition at line 46 of file Parallel.hpp.