Public Member Functions | Public Attributes | List of all members
PLMD::Communicator::Data Struct Reference

Structure defining a buffer for MPI. More...

Public Member Functions

template<typename T >
 Data (Matrix< T > &m)
 Init from reference to PLMD::Matrix. More...
 
 Data (std::string &s)
 Init from reference to std::string. More...
 
template<typename T >
 Data (std::vector< T > &v)
 Init from reference to std::vector. More...
 
template<typename T >
 Data (T &p)
 Init from reference. More...
 
template<typename T >
 Data (T *p, int s)
 Init from pointer and size. More...
 
template<unsigned n, unsigned m>
 Data (TensorGeneric< n, m > &p)
 Init from reference to TensorGeneric. More...
 
template<unsigned n, unsigned m>
 Data (TensorGeneric< n, m > *p, int s)
 Init from pointer to TensorGeneric. More...
 
template<unsigned n>
 Data (VectorGeneric< n > &p)
 Init from reference to VectorGeneric. More...
 
template<unsigned n>
 Data (VectorGeneric< n > *p, int s)
 Init from pointer to VectorGeneric. More...
 

Public Attributes

int nbytes =0
 
void * pointer
 
int size
 
MPI_Datatype type
 

Detailed Description

Structure defining a buffer for MPI.

It contains info on the pointed data and its type and size. It is useful to allow wrapper of MPI functions where the triplet (buffer,type,size) is grouped into a single object. It can be built starting from different kinds of data. To implement compatibility of MPI wrappers with e.g. vectors, add constructors here.

Constructor & Destructor Documentation

◆ Data() [1/9]

template<typename T >
PLMD::Communicator::Data::Data ( T *  p,
int  s 
)
inline

Init from pointer and size.

◆ Data() [2/9]

template<typename T >
PLMD::Communicator::Data::Data ( T &  p)
inlineexplicit

Init from reference.

◆ Data() [3/9]

template<unsigned n>
PLMD::Communicator::Data::Data ( VectorGeneric< n > *  p,
int  s 
)
inlineexplicit

Init from pointer to VectorGeneric.

◆ Data() [4/9]

template<unsigned n>
PLMD::Communicator::Data::Data ( VectorGeneric< n > &  p)
inlineexplicit

Init from reference to VectorGeneric.

◆ Data() [5/9]

template<unsigned n, unsigned m>
PLMD::Communicator::Data::Data ( TensorGeneric< n, m > *  p,
int  s 
)
inlineexplicit

Init from pointer to TensorGeneric.

◆ Data() [6/9]

template<unsigned n, unsigned m>
PLMD::Communicator::Data::Data ( TensorGeneric< n, m > &  p)
inlineexplicit

Init from reference to TensorGeneric.

◆ Data() [7/9]

template<typename T >
PLMD::Communicator::Data::Data ( std::vector< T > &  v)
inlineexplicit

Init from reference to std::vector.

◆ Data() [8/9]

template<typename T >
PLMD::Communicator::Data::Data ( Matrix< T > &  m)
inlineexplicit

Init from reference to PLMD::Matrix.

◆ Data() [9/9]

PLMD::Communicator::Data::Data ( std::string &  s)
inlineexplicit

Init from reference to std::string.

Member Data Documentation

◆ nbytes

int PLMD::Communicator::Data::nbytes =0

◆ pointer

void* PLMD::Communicator::Data::pointer

◆ size

int PLMD::Communicator::Data::size

◆ type

MPI_Datatype PLMD::Communicator::Data::type

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