1 #ifndef MPI_CoreToCoreMessage_H
2 #define MPI_CoreToCoreMessage_H
5 #include "MPI_Object.h"
12 #include "MPI_Environment.h"
15 #include "MPI_Chrono.h"
92 const std::valarray<T>& data,
const tMPITag& tag)=0;
104 const T* data,
const tMPICount& nData,
const tMPIType& dataType,
const tMPITag& tag)=0;
125 std::valarray<T>& data,
const tMPITag& tag)=0;
140 T* buffer,
const tMPICount& nData,
const tMPIType& dataType,
const tMPITag& tag)=0;
157 const T& sentData,
const tMPITag& sentTag,
158 T& receivedData,
const tMPITag& receivedTag)=0;
174 const std::valarray<T>& sentData,
const tMPITag& sentTag,
175 std::valarray<T>& receivedData,
const tMPITag& receivedTag)=0;
195 const T* sentData,
const tMPICount& nSentData,
const tMPIType& sentDataType,
const tMPITag& sentTag,
196 T* receivedData,
const tMPICount& nReceivedData,
const tMPIType& receivedDataType,
const tMPITag& receivedTag)=0;
216 std::valarray<T>& data,
const tMPITag& tag)=0;
250 typename std::vector<CORE_UniquePointer<MPI_CoreToCoreMessage<T>>>::const_iterator iMessage;
251 tBoolean isAllFinished=
false;
252 while (!isAllFinished) {
254 iMessage=messages.begin();
255 while (iMessage!=messages.end()) {
256 isAllFinished=isAllFinished && (*iMessage)->isFinished();
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
This class is a time class to manage time within an environment.
Definition: MPI_Chrono.h:20
void start()
start the chrono
Definition: MPI_Chrono.h:114
tULLInt stop() const
stop the chrono
Definition: MPI_Chrono.h:121
This class is a interface class to send / receive message with primitive type T from one to core to o...
Definition: MPI_CoreToCoreMessage.h:29
MPI_CoreToCoreMessage()
create
Definition: MPI_CoreToCoreMessage.h:43
virtual void receive(const MPI_Environment &env, const tMPICoreId &srcCore, std::valarray< T > &data, const tMPITag &tag)=0
receiving a data with flag to dstCore
virtual tBoolean isFinished()=0
test if the message communication is finished
virtual int wait()=0
wait the end of the message communications
virtual void sendNReceive(const MPI_Environment &env, const tMPICoreId &dstCore, const tMPICoreId &srcCore, const T *sentData, const tMPICount &nSentData, const tMPIType &sentDataType, const tMPITag &sentTag, T *receivedData, const tMPICount &nReceivedData, const tMPIType &receivedDataType, const tMPITag &receivedTag)=0
receiving a data with flag to dstCore
virtual void send(const MPI_Environment &env, const tMPICoreId &dstCore, const std::valarray< T > &data, const tMPITag &tag)=0
sending a data with flag to dstCore
virtual void exchange(const MPI_Environment &env, const tMPICoreId &srcCore, std::valarray< T > &data, const tMPITag &tag)=0
receiving a data with flag to dstCore
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: MPI_CoreToCoreMessage.h:70
static tULLInt WaitAllMessages(const std::vector< CORE_UniquePointer< MPI_CoreToCoreMessage< T >>> &messages)
wait for the end of communication of all messages
Definition: MPI_CoreToCoreMessage.h:247
virtual void send(const MPI_Environment &env, const tMPICoreId &dstCore, const T *data, const tMPICount &nData, const tMPIType &dataType, const tMPITag &tag)=0
blocking send a data with tag to dstCore
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: MPI_CoreToCoreMessage.h:58
virtual void sendNReceive(const MPI_Environment &env, const tMPICoreId &dstCore, const tMPICoreId &srcCore, const std::valarray< T > &sentData, const tMPITag &sentTag, std::valarray< T > &receivedData, const tMPITag &receivedTag)=0
receiving a data with flag to dstCore
virtual void receive(const MPI_Environment &env, const tMPICoreId &dstCore, T *buffer, const tMPICount &nData, const tMPIType &dataType, const tMPITag &tag)=0
blocking send a data with tag to dstCore
virtual ~MPI_CoreToCoreMessage(void)
destroy
Definition: MPI_CoreToCoreMessage.h:50
virtual void sendNReceive(const MPI_Environment &env, const tMPICoreId &dstCore, const tMPICoreId &srcCore, const T &sentData, const tMPITag &sentTag, T &receivedData, const tMPITag &receivedTag)=0
receiving a data with flag to dstCore
virtual void getElementsNumber(tMPICount &nElements)=0
get the number of element of the message
This class is a Environment class to define MPI world.
Definition: MPI_Environment.h:36
This class is a base class of E-MicromM core package.
Definition: MPI_Object.h:32