sisi4s
Loading...
Searching...
No Matches
sisi4s::MpiCommunicator Class Reference

#include <MpiCommunicator.hpp>

Collaboration diagram for sisi4s::MpiCommunicator:

Public Member Functions

 MpiCommunicator (int rank_, int processes_, MPI_Comm comm_=MPI_COMM_WORLD)
 
 MpiCommunicator (const CTF::World &world)
 
 ~MpiCommunicator ()
 
void barrier ()
 
template<typename F >
void reduce (const F &src, F &dst, int rootRank=0)
 
template<typename F >
void allReduce (const F &src, F &dst)
 
template<typename F >
void gather (const std::vector< F > &src, std::vector< F > &dst, int rootRank=0)
 
int getRank () const
 
int getProcesses () const
 

Protected Attributes

int rank
 
int processes
 
MPI_Comm comm
 

Constructor & Destructor Documentation

◆ MpiCommunicator() [1/2]

sisi4s::MpiCommunicator::MpiCommunicator ( int  rank_,
int  processes_,
MPI_Comm  comm_ = MPI_COMM_WORLD 
)
inline

◆ MpiCommunicator() [2/2]

sisi4s::MpiCommunicator::MpiCommunicator ( const CTF::World &  world)
inline

◆ ~MpiCommunicator()

sisi4s::MpiCommunicator::~MpiCommunicator ( )
inline

Member Function Documentation

◆ allReduce()

template<typename F >
void sisi4s::MpiCommunicator::allReduce ( const F &  src,
F &  dst 
)
inline
Here is the caller graph for this function:

◆ barrier()

void sisi4s::MpiCommunicator::barrier ( )
inline
Here is the caller graph for this function:

◆ gather()

template<typename F >
void sisi4s::MpiCommunicator::gather ( const std::vector< F > &  src,
std::vector< F > &  dst,
int  rootRank = 0 
)
inline

\Brief Gathers the src vectors of all ranks together to the dst vector at the given root rank, by default rank 0.

Here is the caller graph for this function:

◆ getProcesses()

int sisi4s::MpiCommunicator::getProcesses ( ) const
inline

◆ getRank()

int sisi4s::MpiCommunicator::getRank ( ) const
inline
Here is the caller graph for this function:

◆ reduce()

template<typename F >
void sisi4s::MpiCommunicator::reduce ( const F &  src,
F &  dst,
int  rootRank = 0 
)
inline
Here is the caller graph for this function:

Member Data Documentation

◆ comm

MPI_Comm sisi4s::MpiCommunicator::comm
protected

◆ processes

int sisi4s::MpiCommunicator::processes
protected

◆ rank

int sisi4s::MpiCommunicator::rank
protected

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