OpenM++ runtime library (libopenm)
openm::MsgExecBase Class Reference

message passing base class More...

#include <msgExecBase.h>

Inheritance diagram for openm::MsgExecBase:
Collaboration diagram for openm::MsgExecBase:

Public Member Functions

virtual ~MsgExecBase (void) noexcept
 cleanup message passing resources.
 
int worldSize (void) const
 return total number of processes in MPI world communicator.
 
int rank (void) const
 return current process rank.
 
int groupRank (void) const
 return rank in modeling group.
 
void startSend (int i_sendTo, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *i_valueArr)
 start non-blocking send of value array to i_sendTo process. More...
 
void startSendPacked (int i_sendTo, const IRowBaseVec &i_rowVec, const IPackedAdapter &i_adapter)
 pack and start non-blocking send of vector of db rows to i_sendTo process. More...
 
bool tryReceive (int i_recvFrom, MsgTag i_msgTag, const type_info &i_type, size_t i_size, void *io_valueArr) const
 try to non-blocking receive value array, return return true if completed. More...
 
bool tryReceive (int i_recvFrom, IRowBaseVec &io_resultRowVec, const IPackedAdapter &i_adapter) const
 try to non-blocking receive and unpack vector of db rows, return return true if completed. More...
 
void waitSendAll (void)
 wait for non-blocking send to be completed.
 

Protected Member Functions

 MsgExecBase (IFinalState *i_final)
 

Protected Attributes

int worldCommSize
 
int worldRank
 
int group_rank
 
IFinalStatetheFinal = nullptr
 
list< unique_ptr< IMsgSend > > sendLst
 

Detailed Description

message passing base class

Member Function Documentation

◆ startSend()

void MsgExecBase::startSend ( int  i_sendTo,
MsgTag  i_msgTag,
const type_info &  i_type,
size_t  i_size,
void *  i_valueArr 
)

start non-blocking send of value array to i_sendTo process.

Parameters
[in]i_sendToreceiver proccess rank
[in]i_msgTagtag to identify message content (parameter or output data)
[in]i_typevalue type
[in]i_sizesize of array
[in]i_valueArrvalue array to send

◆ startSendPacked()

void MsgExecBase::startSendPacked ( int  i_sendTo,
const IRowBaseVec i_rowVec,
const IPackedAdapter i_adapter 
)

pack and start non-blocking send of vector of db rows to i_sendTo process.

Parameters
[in]i_sendToreceiver proccess rank
[in]i_rowVecvector of db rows to send
[in]i_adapteradapter to pack db rows

◆ tryReceive() [1/2]

bool MsgExecBase::tryReceive ( int  i_recvFrom,
IRowBaseVec io_resultRowVec,
const IPackedAdapter i_adapter 
) const

try to non-blocking receive and unpack vector of db rows, return return true if completed.

try to non-blocking receive and unpack vector of db rows, return true if completed.

Parameters
[in]i_recvFromsender proccess rank
[in,out]io_resultRowVecvector to push back received db rows
[in]i_adapteradapter to unpack db rows

◆ tryReceive() [2/2]

bool MsgExecBase::tryReceive ( int  i_recvFrom,
MsgTag  i_msgTag,
const type_info &  i_type,
size_t  i_size,
void *  io_valueArr 
) const

try to non-blocking receive value array, return return true if completed.

try to non-blocking receive value array, return true if completed.

Parameters
[in]i_recvFromsender proccess rank
[in]i_msgTagtag to identify message content (parameter or output data)
[in]i_typevalue type
[in]i_sizesize of array
[in,out]io_valueArrallocated buffer to recieve value array

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