walberla::mpi::internal::NoMPICommunication< RecvBuffer_T, SendBuffer_T > Class Template Reference

#include <BufferSystemHelper.h>

+ Inheritance diagram for walberla::mpi::internal::NoMPICommunication< RecvBuffer_T, SendBuffer_T >:

Public Member Functions

 NoMPICommunication (const MPI_Comm &communicator, int tag=0)
 
 ~NoMPICommunication () override=default
 
void send (MPIRank receiver, const SendBuffer_T &sendBuffer) override
 Send buffer content to receiver using MPI_ISend, request is stored internally -> see waitForSends() More...
 
void waitForSends () override
 Wait for all sends to complete. More...
 
void scheduleReceives (std::map< MPIRank, ReceiveInfo > &recvInfos) override
 Executes MPI_Irecv calls, with the recvInfos as target memory. More...
 
MPIRank waitForNextReceive (std::map< MPIRank, ReceiveInfo > &recvInfos) override
 size field of recvInfos can be invalid, is filled in with the actual message size More...
 
- Public Member Functions inherited from walberla::mpi::internal::AbstractCommunication< RecvBuffer_T, SendBuffer_T >
 AbstractCommunication (const MPI_Comm &communicator, int tag=0)
 
virtual ~AbstractCommunication ()=default
 
virtual int getTag () const
 
virtual MPI_Comm getCommunicator () const
 

Private Attributes

bool received_ { false }
 
RecvBuffer_T tmpBuffer_
 

Additional Inherited Members

- Protected Attributes inherited from walberla::mpi::internal::AbstractCommunication< RecvBuffer_T, SendBuffer_T >
MPI_Comm communicator_
 
int tag_
 

Constructor & Destructor Documentation

◆ NoMPICommunication()

template<typename RecvBuffer_T , typename SendBuffer_T >
walberla::mpi::internal::NoMPICommunication< RecvBuffer_T, SendBuffer_T >::NoMPICommunication ( const MPI_Comm &  communicator,
int  tag = 0 
)
inline

◆ ~NoMPICommunication()

template<typename RecvBuffer_T , typename SendBuffer_T >
walberla::mpi::internal::NoMPICommunication< RecvBuffer_T, SendBuffer_T >::~NoMPICommunication ( )
overridedefault

Member Function Documentation

◆ scheduleReceives()

template<typename Rb , typename Sb >
void walberla::mpi::internal::NoMPICommunication< Rb, Sb >::scheduleReceives ( std::map< MPIRank, ReceiveInfo > &  recvInfos)
overridevirtual

Executes MPI_Irecv calls, with the recvInfos as target memory.

Parameters
recvInfosMap that has entries for all ranks where messages are expected. The KnownSizeCommunication also expects the size field to be valid ( defining the expected message size) Do not change/read the recvInfos after scheduleReceive() call and before waitForNextReceive() is completed

Implements walberla::mpi::internal::AbstractCommunication< RecvBuffer_T, SendBuffer_T >.

◆ send()

template<typename RecvBuffer_T , typename SendBuffer_T >
void walberla::mpi::internal::NoMPICommunication< Rb, Sb >::send ( MPIRank  rank,
const SendBuffer_T &  sendBuffer 
)
overridevirtual

Send buffer content to receiver using MPI_ISend, request is stored internally -> see waitForSends()

Implements walberla::mpi::internal::AbstractCommunication< RecvBuffer_T, SendBuffer_T >.

◆ waitForNextReceive()

template<typename Rb , typename Sb >
MPIRank walberla::mpi::internal::NoMPICommunication< Rb, Sb >::waitForNextReceive ( std::map< MPIRank, ReceiveInfo > &  recvInfos)
overridevirtual

size field of recvInfos can be invalid, is filled in with the actual message size

Implements walberla::mpi::internal::AbstractCommunication< RecvBuffer_T, SendBuffer_T >.

◆ waitForSends()

template<typename Rb , typename Sb >
void walberla::mpi::internal::NoMPICommunication< Rb, Sb >::waitForSends ( )
overridevirtual

Member Data Documentation

◆ received_

template<typename RecvBuffer_T , typename SendBuffer_T >
bool walberla::mpi::internal::NoMPICommunication< RecvBuffer_T, SendBuffer_T >::received_ { false }
private

◆ tmpBuffer_

template<typename RecvBuffer_T , typename SendBuffer_T >
RecvBuffer_T walberla::mpi::internal::NoMPICommunication< RecvBuffer_T, SendBuffer_T >::tmpBuffer_
private

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