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

#include <BufferSystemHelper.h>

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

Public Member Functions

 UnknownSizeCommunicationIProbe (const MPI_Comm &communicator, int tag=0)
 
 ~UnknownSizeCommunicationIProbe () 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 sending_ {false}
 
bool receiving_ {false}
 
int pendingReceives_
 
std::vector< MPI_Request > sendRequests_
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ UnknownSizeCommunicationIProbe()

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

◆ ~UnknownSizeCommunicationIProbe()

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

Member Function Documentation

◆ scheduleReceives()

template<typename Rb , typename Sb >
void walberla::mpi::internal::UnknownSizeCommunicationIProbe< 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::UnknownSizeCommunicationIProbe< 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::UnknownSizeCommunicationIProbe< 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::UnknownSizeCommunicationIProbe< Rb, Sb >::waitForSends ( )
overridevirtual

Member Data Documentation

◆ pendingReceives_

template<typename RecvBuffer_T , typename SendBuffer_T >
int walberla::mpi::internal::UnknownSizeCommunicationIProbe< RecvBuffer_T, SendBuffer_T >::pendingReceives_
private

◆ receiving_

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

◆ sending_

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

◆ sendRequests_

template<typename RecvBuffer_T , typename SendBuffer_T >
std::vector<MPI_Request> walberla::mpi::internal::UnknownSizeCommunicationIProbe< RecvBuffer_T, SendBuffer_T >::sendRequests_
private

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