ThunderEgg  1.0.0
ThunderEgg::Communicator Class Reference

wrapper arount MPI_Comm, provides proper copy operators. Classes that have a communicator are meant to store a Communicator object instead of a raw MPI_Comm More...

#include <Communicator.h>

Public Member Functions

 Communicator ()=default
 Construct a new Communicator with a null communicator.
 
 ~Communicator ()
 Destroy the Communicator object.
 
 Communicator (const Communicator &other)
 Construct a new Communicator object. More...
 
Communicatoroperator= (const Communicator &other)
 Copy the communcator object. More...
 
 Communicator (Communicator &&other)
 
Communicatoroperator= (Communicator &&other)
 
 Communicator (MPI_Comm comm)
 Construct a new Communicator from a specified MPI_Comm. More...
 
MPI_Comm getMPIComm () const
 Get the raw MPI_Comm object. More...
 
int getSize () const
 Get the size of the communicator. More...
 
int getRank () const
 Get the rank of this processor. More...
 

Detailed Description

wrapper arount MPI_Comm, provides proper copy operators. Classes that have a communicator are meant to store a Communicator object instead of a raw MPI_Comm

Constructor & Destructor Documentation

◆ Communicator() [1/2]

ThunderEgg::Communicator::Communicator ( const Communicator other)

Construct a new Communicator object.

Parameters
otherthe Communicator to copy

◆ Communicator() [2/2]

ThunderEgg::Communicator::Communicator ( MPI_Comm  comm)
explicit

Construct a new Communicator from a specified MPI_Comm.

Parameters
commthe comm

Member Function Documentation

◆ getMPIComm()

MPI_Comm ThunderEgg::Communicator::getMPIComm ( ) const

Get the raw MPI_Comm object.

Returns
MPI_Comm the comm

◆ getRank()

int ThunderEgg::Communicator::getRank ( ) const

Get the rank of this processor.

Returns
int the rank

◆ getSize()

int ThunderEgg::Communicator::getSize ( ) const

Get the size of the communicator.

Returns
int the size

◆ operator=()

Communicator& ThunderEgg::Communicator::operator= ( const Communicator other)

Copy the communcator object.

Parameters
otherthe Communicator to copy
Returns
Communicator& this object

The documentation for this class was generated from the following file: