C++ mpi module for stochmagnet_main Package
MPI_CoreToCoreWMessage.h
1 #ifndef MPI_CoreToCoreWMessage_H
2 #define MPI_CoreToCoreWMessage_H
3 
4 //inherited class header
5 #include "MPI_CoreToCoreMessage.h"
6 
7 
18 template<typename T>
20 
21  //attributes
22 private :
23 
24  //UML inheritance classes
27 
28  //state attributes
29  tMPIStatus mStatus;
30 
31 public:
32  // CONSTRUCTORS
36 
37  }
38 
39  // DESTRUCTORS
42  virtual ~MPI_CoreToCoreWMessage(void) {
43 
44  }
45 public:
49  inline static CORE_UniquePointer<SelfClass> New() {
50  CORE_UniquePointer<SelfClass> p(new SelfClass(), CORE_Object::Delete());
51  return p;
52  };
53 
54  //memory management
55  //=================
58  virtual tMemSize getMemorySize() const override{
59  return sizeof(*this)+this->getContentsMemorySize();
60  }
69  virtual tMemSize getContentsMemorySize() const override {
71  }
72 
73 
74  //sender methods
75  //===============
76 
77 
78  //primary type variable
79  //----------------------
80 
87  inline static void Send(const MPI_Environment& env,const tMPICoreId& dstCore,
88  const T& data,const tMPITag& tag) {
89  MPI_Send(&data,1,MPI_Type::GetPrimaryType<T>(),dstCore,tag,env.getWorld());
90  }
91 
92  //pointer of primary type
93  //------------------------
101  inline static void Send(const MPI_Environment& env,const tMPICoreId& dstCore,
102  const T* data,const tMPICount& nData,const tMPITag& tag) {
103  MPI_Send(data,nData,MPI_Type::GetPrimaryType<T>(),dstCore,tag,env.getWorld());
104  }
105 
106 
107 
108  //valarray primary type
109  //---------------------
110 
117  inline static void Send(const MPI_Environment& env,const tMPICoreId& dstCore,
118  const std::valarray<T>& data,const tMPITag& tag) {
119  MPI_Send(&data[0],data.size(),MPI_Type::GetPrimaryType<T>(),dstCore,tag,env.getWorld());
120  }
121 
122 
123 
130  virtual void send(const MPI_Environment& env,const tMPICoreId& dstCore,
131  const std::valarray<T>& data,const tMPITag& tag) override {
132 
133  Send(env,dstCore,data,tag);
134 
135 
136  }
137 
138  //MPI type
139  //--------
147  virtual void send(const MPI_Environment& env,const tMPICoreId& dstCore,
148  const T* data,const tMPICount& nData,const tMPIType& dataType,const tMPITag& tag) override {
149  Send(env,dstCore,data,nData,dataType,tag);
150  }
151 
159  inline static void Send(const MPI_Environment& env,const tMPICoreId& dstCore,
160  const T* data,const tMPICount& nData,const tMPIType& dataType,const tMPITag& tag) {
161  MPI_Send(data,nData,dataType,dstCore,tag,env.getWorld());
162  }
163 
164 
165 
166  //receive methods
167  //===============
168 
169  //primary type variable
170  //----------------------
177  inline static tBoolean Receive(const MPI_Environment& env,const tMPICoreId& srcCore,
178  T& data,const tMPITag& tag) {
179  MPI_Recv(&data,1,MPI_Type::GetPrimaryType<T>(),srcCore,tag,env.getWorld(),MPI_STATUS_IGNORE);
180  return true;
181  }
182 
183 
184  //pointer of primary type
185  //------------------------
186 
187 
195  inline static void Receive(const MPI_Environment& env,const tMPICoreId& srcCore,
196  T* buffer,const tMPICount& nData,const tMPITag& tag) {
197  MPI_Recv(buffer,nData,MPI_Type::GetPrimaryType<T>(),srcCore,tag,env.getWorld(),MPI_STATUS_IGNORE);
198  }
199 
200 
201 
202 
203  //valarray primary type
204  //---------------------
205 
212  inline static tBoolean Receive(const MPI_Environment& env,const tMPICoreId& srcCore,
213  std::valarray<T>& data,const tMPITag& tag) {
214  MPI_Recv(&data[0],data.size(),MPI_Type::GetPrimaryType<T>(),srcCore,tag,env.getWorld(),MPI_STATUS_IGNORE);
215  return true;
216  }
224  inline static tBoolean Receive(const MPI_Environment& env,const tMPICoreId& srcCore,
225  std::valarray<T>& data,const tMPITag& tag,tMPIStatus& status) {
226  MPI_Recv(&data[0],data.size(),MPI_Type::GetPrimaryType<T>(),srcCore,tag,env.getWorld(),&status);
227  return true;
228  }
229 
230 
237  virtual void receive(const MPI_Environment& env,const tMPICoreId& srcCore,
238  std::valarray<T>& data,const tMPITag& tag) override {
239  Receive(env,srcCore,data,tag,mStatus);
240 
241  }
250  inline static tBoolean Receive(const MPI_Environment& env,const tMPICoreId& srcCore,
251  std::valarray<T>& data,const tMPIInteger& nData,
252  const tMPITag& tag,
253  tMPIStatus& status) {
254  MPI_Probe(srcCore,tag,env.getWorld(),&status);
255  MPI_Get_count(&status,MPI_Type::GetPrimaryType<T>(), &nData);
256  data.resize(nData);
257  MPI_recv(&data[0],nData,MPI_Type::GetPrimaryType<T>(),srcCore,tag,env.getWorld(),&status);
258  return true;
259  }
260 
261  //MPI type
262  //--------
263 
264 
274  inline static void Receive(const MPI_Environment& env,const tMPICoreId& dstCore,
275  T* buffer,const tMPICount& nData,const tMPIType& dataType,const tMPITag& tag,
276  tMPIStatus& status) {
277  MPI_Recv(buffer,nData,dataType,dstCore,tag,env.getWorld(),&status);
278  }
287  inline static void Receive(const MPI_Environment& env,const tMPICoreId& dstCore,
288  T* buffer,const tMPICount& nData,const tMPIType& dataType,const tMPITag& tag) {
289  MPI_Recv(buffer,nData,dataType,dstCore,tag,env.getWorld(),MPI_STATUS_IGNORE);
290  }
291 
300  virtual void receive(const MPI_Environment& env,const tMPICoreId& dstCore,
301  T* buffer,const tMPICount& nData,const tMPIType& dataType,const tMPITag& tag) override {
302  Receive(env,dstCore,buffer,nData,dataType,tag,mStatus);
303  }
304 
305 
306 
307 
308  //send & receive methods
309  //=======================
310 
311  //primary type variable
312  //----------------------
322  virtual void SendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
323  const T& sentData,const tMPITag& sentTag,
324  T& receivedData,const tMPITag& receivedTag,
325  tMPIStatus& status) {
326  MPI_Sendrecv(&sentData,1,MPI_Type::GetPrimaryType<T>(),
327  dstCore,sentTag,
328  &receivedData,1,MPI_Type::GetPrimaryType<T>(),
329  dstCore,receivedTag,
330  env.getWorld(),&status);
331  }
332 
342  virtual void sendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
343  const T& sentData,const tMPITag& sentTag,
344  T& receivedData,const tMPITag& receivedTag) override {
345  SendNReceive(env,dstCore,srcCore,sentData,sentTag,receivedData,receivedTag,mStatus);
346  }
347 
348  //pointer of primary type
349  //------------------------
350 
351 
352 
363  inline static void SendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,
364  const T* sentData,const int& nSentData,const tMPITag& sentTag,
365  T* receivedData,const int& nReceivedData,const tMPITag& receivedTag) {
366  ASSERT_IN(sentData!=receivedData);
367  ASSERT_IN(nSentData==nReceivedData);
368  MPI_Sendrecv(sentData,nSentData,MPI_Type::GetPrimaryType<T>(),
369  dstCore,sentTag,
370  receivedData,nReceivedData,MPI_Type::GetPrimaryType<T>(),
371  dstCore,receivedTag,
372  env.getWorld(),MPI_STATUS_IGNORE);
373 
374  }
375 
376 
377 
378 
379  //valarray primary type
380  //---------------------
381 
382 
394  inline static void SendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
395  const std::valarray<T>& sentData,const tMPITag& sentTag,
396  std::valarray<T>& receivedData,const tMPITag& receivedTag,
397  tMPIStatus& status) {
398 
399  ASSERT_IN(&sentData!=&receivedData);
400  if (receivedData.size()<sentData.size()) receivedData.resize( sentData.size());
401 
402  MPI_Sendrecv(&sentData[0],sentData.size(),MPI_Type::GetPrimaryType<T>(),
403  dstCore,sentTag,
404  &receivedData[0],receivedData.size(),MPI_Type::GetPrimaryType<T>(),
405  srcCore,receivedTag,
406  env.getWorld(),&status);
407 
408  }
409 
410 
411 
421  virtual void sendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
422  const std::valarray<T>& sentData,const tMPITag& sentTag,
423  std::valarray<T>& receivedData,const tMPITag& receivedTag) override {
424  SendNReceive(env,dstCore,srcCore,
425  sentData,sentTag,
426  receivedData,receivedTag,mStatus);
427  }
428 
429 
430  //MPI type
431  //--------
432 
447  inline static void SendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
448  const T* sentData,const tMPICount& nSentData,const tMPIType& sentDataType,const tMPITag& sentTag,
449  T* receivedData,const tMPICount& nReceivedData,const tMPIType& receivedDataType,const tMPITag& receivedTag,
450  MPI_Status& status) {
451  ASSERT_IN(&sentData!=&receivedData);
452 
453  MPI_Sendrecv(&sentData[0],nSentData,sentDataType,
454  dstCore,sentTag,
455  &receivedData[0],nReceivedData,receivedDataType,
456  srcCore,receivedTag,
457  env.getWorld(),&status);
458 
459  }
473  inline static void SendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
474  const T* sentData,const tMPICount& nSentData,const tMPIType& sentDataType,const tMPITag& sentTag,
475  T* receivedData,const tMPICount& nReceivedData,const tMPIType& receivedDataType,const tMPITag& receivedTag) {
476  ASSERT_IN(&sentData!=&receivedData);
477 
478  MPI_Sendrecv(&sentData[0],nSentData,sentDataType,
479  dstCore,sentTag,
480  &receivedData[0],nReceivedData,receivedDataType,
481  srcCore,receivedTag,
482  env.getWorld(),MPI_STATUS_IGNORE);
483 
484  }
485 
498  inline static void SendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,
499  const T* sentData,const tMPICount& nSentData,const tMPIType& sentDataType,const tMPITag& sentTag,
500  T* receivedData,const tMPICount& nReceivedData,const tMPIType& receivedDataType,const tMPITag& receivedTag) {
501  ASSERT_IN(&sentData!=&receivedData);
502 
503  MPI_Sendrecv(&sentData[0],nSentData,sentDataType,
504  dstCore,sentTag,
505  &receivedData[0],nReceivedData,receivedDataType,
506  dstCore,receivedTag,
507  env.getWorld(),MPI_STATUS_IGNORE);
508 
509  }
510 
524  virtual void sendNReceive(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
525  const T* sentData,const tMPICount& nSentData,const tMPIType& sentDataType,const tMPITag& sentTag,
526  T* receivedData,const tMPICount& nReceivedData,const tMPIType& receivedDataType,const tMPITag& receivedTag) override {
527  SendNReceive(env,dstCore,srcCore,
528  sentData,nSentData,sentDataType,sentTag,
529  receivedData,nReceivedData,receivedDataType,receivedTag,
530  mStatus);
531  }
532 
533  //exchange methods
534  //=======================
535 
536  //primary type variable
537  //----------------------
538 
539 
540  //pointer of primary type
541  //------------------------
542 
553  inline static void Exchange(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
554  T* data,const int& nData,const tMPITag& sentTag,const tMPITag& receivedTag,
555  MPI_Status& status) {
556  MPI_Sendrecv_replace(data,nData,MPI_Type::GetPrimaryType<T>(),
557  dstCore,sentTag,
558  srcCore,receivedTag,
559  env.getWorld(),&status);
560 
561  }
571  inline static void Exchange(const MPI_Environment& env,const tMPICoreId& dstCore,
572  T* data,const int& nData,const tMPITag& sentTag,const tMPITag& receivedTag,
573  MPI_Status& status) {
574  MPI_Sendrecv_replace(data,nData,MPI_Type::GetPrimaryType<T>(),
575  dstCore,sentTag,
576  dstCore,receivedTag,
577  env.getWorld(),&status);
578 
579  }
580 
581 
590  inline static void Exchange(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
591  T* data,const int& nData,const tMPITag& tag) {
592  MPI_Sendrecv_replace(data,nData,MPI_Type::GetPrimaryType<T>(),
593  dstCore,tag,
594  srcCore,tag,
595  env.getWorld(),MPI_STATUS_IGNORE);
596 
597  }
598 
599  //valarray of primary type
600  //------------------------
601 
610  inline static void Exchange(const MPI_Environment& env,const tMPICoreId& dstCore,const tMPICoreId& srcCore,
611  std::valarray<T>& data,const tMPITag& sendTag,const tMPITag& receivedTag) {
612  MPI_Sendrecv_replace(&data[0],data.size(),MPI_Type::GetPrimaryType<T>(),
613  dstCore,sendTag,
614  srcCore,receivedTag,
615  env.getWorld(),MPI_STATUS_IGNORE);
616  }
617 
618 
619 
620 
628  inline static void Exchange(const MPI_Environment& env,const tMPICoreId& dstCore,
629  std::valarray<T>& data,const tMPITag& tag,
630  tMPIStatus& status) {
631  MPI_Sendrecv_replace(&data[0],data.size(),MPI_Type::GetPrimaryType<T>(),
632  dstCore,tag,
633  dstCore,tag,
634  env.getWorld(),&status);
635 
636  }
637 
644  inline static void Exchange(const MPI_Environment& env,const tMPICoreId& dstCore,
645  std::valarray<T>& data,const tMPITag& tag) {
646  MPI_Sendrecv_replace(&data[0],data.size(),MPI_Type::GetPrimaryType<T>(),
647  dstCore,tag,
648  dstCore,tag,
649  env.getWorld(),MPI_STATUS_IGNORE);
650 
651  }
652 
659  virtual void exchange(const MPI_Environment& env,const tMPICoreId& dstCore,
660  std::valarray<T>& data,const tMPITag& tag) override {
661  Exchange(env,dstCore,data,tag,mStatus);
662  }
663 
664 
665 
666  //MPI type
667  //--------
668 
669 
678  inline static void Exchange( const MPI_Environment& env,const tMPICoreId& dstCore,
679  T* data,const int& nData,const tMPIType& dataType,const tMPITag& tag) {
680 
681  MPI_Sendrecv_replace(data,nData,dataType,
682  dstCore,tag,
683  dstCore,tag,
684  env.getWorld(),MPI_STATUS_IGNORE);
685 
686  }
687 
688 
689 
690  //status methods
691  //================
692 
701  inline static void GetElementsNumber(const MPI_Environment& env,
702  const tMPICoreId& srcCore,
703  const tMPITag& tag,
704  tMPIStatus& status,
705  tMPICount& nElements) {
706  MPI_Probe(srcCore,tag,env.getWorld(),&status);
707  MPI_Get_count(&status,MPI_Type::GetPrimaryType<T>(),&nElements);
708  }
709 
710 
715  inline void GetElementsNumber(const tMPIStatus& status,tMPICount& nElements) {
716  MPI_Get_count(&status,MPI_Type::GetPrimaryType<T>(),&nElements);
717  }
718 
722  virtual void getElementsNumber(tMPICount& nElements) override {
723  GetElementsNumber(mStatus,nElements);
724  }
725 
729  virtual int wait() override {
730  return 0;
731  }
732 
736  virtual tBoolean isFinished() override {
737  return true;
738  }
739 };
740 
741 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
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
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: MPI_CoreToCoreMessage.h:70
This class is a class to send / receive blocking message from one to core to one core.
Definition: MPI_CoreToCoreWMessage.h:19
static void Send(const MPI_Environment &env, const tMPICoreId &dstCore, const T &data, const tMPITag &tag)
blocking send a data with tag to dstCore
Definition: MPI_CoreToCoreWMessage.h:87
virtual void exchange(const MPI_Environment &env, const tMPICoreId &dstCore, std::valarray< T > &data, const tMPITag &tag) override
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:659
static tBoolean Receive(const MPI_Environment &env, const tMPICoreId &srcCore, std::valarray< T > &data, const tMPITag &tag)
receive a data with tag from source core
Definition: MPI_CoreToCoreWMessage.h:212
virtual void SendNReceive(const MPI_Environment &env, const tMPICoreId &dstCore, const tMPICoreId &srcCore, const T &sentData, const tMPITag &sentTag, T &receivedData, const tMPITag &receivedTag, tMPIStatus &status)
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:322
static void Send(const MPI_Environment &env, const tMPICoreId &dstCore, const std::valarray< T > &data, const tMPITag &tag)
blocking send a data with tag to dstCore
Definition: MPI_CoreToCoreWMessage.h:117
static void SendNReceive(const MPI_Environment &env, const tMPICoreId &dstCore, const T *sentData, const int &nSentData, const tMPITag &sentTag, T *receivedData, const int &nReceivedData, const tMPITag &receivedTag)
blocking swapping a data with tag to dst Core and receive a data from src core
Definition: MPI_CoreToCoreWMessage.h:363
static void Exchange(const MPI_Environment &env, const tMPICoreId &dstCore, const tMPICoreId &srcCore, T *data, const int &nData, const tMPITag &sentTag, const tMPITag &receivedTag, MPI_Status &status)
blocking sending a data with tag to dst Core and receive a data from src core in the same location da...
Definition: MPI_CoreToCoreWMessage.h:553
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) override
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:421
virtual int wait() override
wait the end of the message return 0 : do not wait
Definition: MPI_CoreToCoreWMessage.h:729
static void Receive(const MPI_Environment &env, const tMPICoreId &dstCore, T *buffer, const tMPICount &nData, const tMPIType &dataType, const tMPITag &tag, tMPIStatus &status)
blocking send a data with tag to dstCore
Definition: MPI_CoreToCoreWMessage.h:274
static tBoolean Receive(const MPI_Environment &env, const tMPICoreId &srcCore, std::valarray< T > &data, const tMPIInteger &nData, const tMPITag &tag, tMPIStatus &status)
receive a data with tag from source core
Definition: MPI_CoreToCoreWMessage.h:250
static 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, tMPIStatus &status)
blocking swapping a data with tag to dst Core and receive a data from src core
Definition: MPI_CoreToCoreWMessage.h:394
virtual void send(const MPI_Environment &env, const tMPICoreId &dstCore, const T *data, const tMPICount &nData, const tMPIType &dataType, const tMPITag &tag) override
blocking send a data with tag to dstCore
Definition: MPI_CoreToCoreWMessage.h:147
virtual void receive(const MPI_Environment &env, const tMPICoreId &dstCore, T *buffer, const tMPICount &nData, const tMPIType &dataType, const tMPITag &tag) override
blocking send a data with tag to dstCore
Definition: MPI_CoreToCoreWMessage.h:300
static tBoolean Receive(const MPI_Environment &env, const tMPICoreId &srcCore, std::valarray< T > &data, const tMPITag &tag, tMPIStatus &status)
receive a data with tag from source core
Definition: MPI_CoreToCoreWMessage.h:224
static void Exchange(const MPI_Environment &env, const tMPICoreId &dstCore, std::valarray< T > &data, const tMPITag &tag, tMPIStatus &status)
blocking sending a data with tag to dst Core and receive a data from src core in the same location da...
Definition: MPI_CoreToCoreWMessage.h:628
static void Exchange(const MPI_Environment &env, const tMPICoreId &dstCore, std::valarray< T > &data, const tMPITag &tag)
blocking sending a data with tag to dst Core and receive a data from src core in the same location da...
Definition: MPI_CoreToCoreWMessage.h:644
static void Receive(const MPI_Environment &env, const tMPICoreId &srcCore, T *buffer, const tMPICount &nData, const tMPITag &tag)
blocking receive a data with tag from srcCore
Definition: MPI_CoreToCoreWMessage.h:195
virtual void getElementsNumber(tMPICount &nElements) override
get the number of element of the message
Definition: MPI_CoreToCoreWMessage.h:722
void GetElementsNumber(const tMPIStatus &status, tMPICount &nElements)
get the number of elements in the message with status
Definition: MPI_CoreToCoreWMessage.h:715
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: MPI_CoreToCoreWMessage.h:69
static 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)
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:473
static tBoolean Receive(const MPI_Environment &env, const tMPICoreId &srcCore, T &data, const tMPITag &tag)
blocking receive a data with tag from source core
Definition: MPI_CoreToCoreWMessage.h:177
static void Exchange(const MPI_Environment &env, const tMPICoreId &dstCore, T *data, const int &nData, const tMPITag &sentTag, const tMPITag &receivedTag, MPI_Status &status)
blocking sending a data with tag to dst Core and receive a data from src core in the same location da...
Definition: MPI_CoreToCoreWMessage.h:571
MPI_CoreToCoreWMessage()
create
Definition: MPI_CoreToCoreWMessage.h:35
static void Receive(const MPI_Environment &env, const tMPICoreId &dstCore, T *buffer, const tMPICount &nData, const tMPIType &dataType, const tMPITag &tag)
blocking send a data with tag to dstCore
Definition: MPI_CoreToCoreWMessage.h:287
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) override
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:524
static CORE_UniquePointer< SelfClass > New()
create an unique instance of the class This
Definition: MPI_CoreToCoreWMessage.h:49
virtual tBoolean isFinished() override
test if the communication is fnished
Definition: MPI_CoreToCoreWMessage.h:736
static void Send(const MPI_Environment &env, const tMPICoreId &dstCore, const T *data, const tMPICount &nData, const tMPIType &dataType, const tMPITag &tag)
blocking send a data with tag to dstCore
Definition: MPI_CoreToCoreWMessage.h:159
virtual void send(const MPI_Environment &env, const tMPICoreId &dstCore, const std::valarray< T > &data, const tMPITag &tag) override
sending a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:130
static void Exchange(const MPI_Environment &env, const tMPICoreId &dstCore, const tMPICoreId &srcCore, std::valarray< T > &data, const tMPITag &sendTag, const tMPITag &receivedTag)
blocking sending a data with tag to dst Core and receive a data from src core in the same location da...
Definition: MPI_CoreToCoreWMessage.h:610
static void Exchange(const MPI_Environment &env, const tMPICoreId &dstCore, const tMPICoreId &srcCore, T *data, const int &nData, const tMPITag &tag)
blocking sending a data with tag to dst Core and receive a data from src core in the same location da...
Definition: MPI_CoreToCoreWMessage.h:590
static 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, MPI_Status &status)
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:447
static void SendNReceive(const MPI_Environment &env, const tMPICoreId &dstCore, const T *sentData, const tMPICount &nSentData, const tMPIType &sentDataType, const tMPITag &sentTag, T *receivedData, const tMPICount &nReceivedData, const tMPIType &receivedDataType, const tMPITag &receivedTag)
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:498
virtual ~MPI_CoreToCoreWMessage(void)
destroy
Definition: MPI_CoreToCoreWMessage.h:42
static void Exchange(const MPI_Environment &env, const tMPICoreId &dstCore, T *data, const int &nData, const tMPIType &dataType, const tMPITag &tag)
blocking sending a data with tag to dst Core and receive a data from dst core in the same location da...
Definition: MPI_CoreToCoreWMessage.h:678
static void GetElementsNumber(const MPI_Environment &env, const tMPICoreId &srcCore, const tMPITag &tag, tMPIStatus &status, tMPICount &nElements)
get the elements number of the sending message before receiving it
Definition: MPI_CoreToCoreWMessage.h:701
static void Send(const MPI_Environment &env, const tMPICoreId &dstCore, const T *data, const tMPICount &nData, const tMPITag &tag)
blocking send a data with tag to dstCore
Definition: MPI_CoreToCoreWMessage.h:101
virtual void receive(const MPI_Environment &env, const tMPICoreId &srcCore, std::valarray< T > &data, const tMPITag &tag) override
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:237
virtual void sendNReceive(const MPI_Environment &env, const tMPICoreId &dstCore, const tMPICoreId &srcCore, const T &sentData, const tMPITag &sentTag, T &receivedData, const tMPITag &receivedTag) override
receiving a data with flag to dstCore
Definition: MPI_CoreToCoreWMessage.h:342
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: MPI_CoreToCoreWMessage.h:58
This class is a Environment class to define MPI world.
Definition: MPI_Environment.h:36
const tMPIComm & getWorld() const
get the world of the environment for reading
Definition: MPI_Environment.h:165
This class is a base class of E-MicromM core package.
Definition: MPI_Object.h:32