45 virtual void send(
unsigned num,
const T* array,
unsigned recvRank,
int tag)
const = 0;
64 startSend(
unsigned num,
const T* arr,
unsigned recvRank,
int tag)
const = 0;
74 recv(
unsigned num, std::vector<T>& array,
unsigned sendRank,
int tag)
const = 0;
83 virtual void recv(
unsigned num, T* array,
unsigned sendRank,
int tag)
const = 0;
93 startRecv(
unsigned num,
unsigned sendRank,
int tag = -1)
const = 0;
105 startRecv(
unsigned num, T* arr,
unsigned sendRank,
int tag = -1)
const = 0;
115 virtual void allReduce(
unsigned num, T* sendBuff, T* recvBuff, MPI_Op op)
const = 0;
117 virtual void broadcast(
unsigned num, T* buffer,
int root)
const = 0;
135 void resizeArray(T*& array,
unsigned& numElem,
unsigned reqNumElem)
const
137 if (numElem < reqNumElem)
141 array =
new T[reqNumElem];
144 numElem = reqNumElem;
Provides interface for messaging between processes.
Definition: wxmsgtmpl.h:27
virtual void recv(unsigned num, std::vector< T > &array, unsigned sendRank, int tag) const =0
Receive an array from another rank.
void resizeArray(T *&array, unsigned &numElem, unsigned reqNumElem) const
Resizes a array.
Definition: wxmsgtmpl.h:135
virtual void recv(unsigned num, T *array, unsigned sendRank, int tag) const =0
Receive an array from another rank.
WxMsgTmpl()
Protected so only children can make instances.
Definition: wxmsgtmpl.h:123
virtual void finishSend(WxMsgStatus ms) const =0
Finish the send started by startSend.
virtual WxMsgStatus startRecv(unsigned num, unsigned sendRank, int tag=-1) const =0
Receive an array from another rank.
virtual void broadcast(unsigned num, T *buffer, int root) const =0
virtual WxMsgStatus startSend(unsigned num, const T *arr, unsigned recvRank, int tag) const =0
Send an array to another rank.
unsigned _sendSize
Definition: wxmsgtmpl.h:181
virtual ~WxMsgTmpl()
Destructor.
Definition: wxmsgtmpl.h:32
virtual void allReduce(unsigned num, T *sendBuff, T *recvBuff, MPI_Op op) const =0
Reduce data to all ranks.
void resizeSendBuff(unsigned reqSize)
Checks the buffer and resizes it if necessary.
Definition: wxmsgtmpl.h:153
virtual WxMsgStatus startRecv(unsigned num, T *arr, unsigned sendRank, int tag=-1) const =0
Receive an array from another rank.
T * _recvBuff
Definition: wxmsgtmpl.h:185
T * _sendBuff
Definition: wxmsgtmpl.h:182
void resizeRecvBuff(unsigned reqSize)
Checks the buffer and resizes it if necessary.
Definition: wxmsgtmpl.h:170
virtual void send(unsigned num, const T *array, unsigned recvRank, int tag) const =0
Send an array to another rank.
unsigned _recvSize
Definition: wxmsgtmpl.h:184
WxMsgStatus_v * WxMsgStatus
Definition: wxmsgtmpl.h:21
Provides a means for derived messengers to return implimentation specific message status flags and da...
Definition: wxmsgtmpl.h:19