C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | List of all members
MPI_CoreToCoreBMessage< T > Class Template Reference

This class is a class to send / receive buffered messages from one to core to one core. More...

#include <MPI_CoreToCoreBMessage.h>

Inheritance diagram for MPI_CoreToCoreBMessage< T >:
Inheritance graph
[legend]
Collaboration diagram for MPI_CoreToCoreBMessage< T >:
Collaboration graph
[legend]

Public Member Functions

 MPI_CoreToCoreBMessage (const tInteger &nElements, const tInteger &nMessage)
 create a buffer message with nMessages which each message is compozed by maximum of nElements of T
 
virtual ~MPI_CoreToCoreBMessage (void)
 destroy
 
virtual tMemSize getMemorySize () const override
 return the memory size of the class
 
void send (const MPI_Environment &env, const tMPICoreId &dstCore, const T &data, const tMPITag &flag) const
 buffred sent of a data with flag to dstCore More...
 
void allocateBuffer (const tInteger &nElements, const tInteger &nMessages)
 allocate the buffer More...
 
void desallocateBuffer ()
 desallocate the buffer
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
virtual tMemSize getContentsMemorySize () const
 return nthe memory size of the included associations More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 
virtual tString toString () const
 return the string representation of the object node More...
 

Static Public Member Functions

static CORE_UniquePointer< MPI_CoreToCoreBMessage< T > > New ()
 create an unique instance of the class This More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Additional Inherited Members

- Protected Member Functions inherited from MPI_Object
 MPI_Object (void)
 create
 
virtual ~MPI_Object (void)
 destroy
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

template<typename T>
class MPI_CoreToCoreBMessage< T >

This class is a class to send / receive buffered messages from one to core to one core.

Template Parameters
T: type of messages to exchange

Member Function Documentation

◆ allocateBuffer()

template<typename T >
void MPI_CoreToCoreBMessage< T >::allocateBuffer ( const tInteger &  nElements,
const tInteger &  nMessages 
)
inline

allocate the buffer

Parameters
[in]nElements: elements number per message to allocate
[in]nMessages: messages number to allocate

◆ New()

template<typename T >
static CORE_UniquePointer<MPI_CoreToCoreBMessage<T> > MPI_CoreToCoreBMessage< T >::New ( )
inlinestatic

create an unique instance of the class This

Returns
a new unique instance of the class This

◆ send()

template<typename T >
void MPI_CoreToCoreBMessage< T >::send ( const MPI_Environment env,
const tMPICoreId &  dstCore,
const T &  data,
const tMPITag &  flag 
) const
inline

buffred sent of a data with flag to dstCore

Parameters
[in]envenvironment of the destination Core
[in]dstCoreid of the destination core
[in]datadata to send
[in]flagflag of the data

No bufferizing & no copy by need that the destination core is ready to receive the message


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