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 (T *p, int s)
 Init from pointer and size. More...
 
template<typename T >
 Data (T &p)
 Init from reference. More...
 
template<unsigned n>
 Data (VectorGeneric< n > *p, int s)
 Init from pointer to VectorGeneric. More...
 
template<unsigned n>
 Data (VectorGeneric< n > &p)
 Init from reference to VectorGeneric. More...
 
template<unsigned n, unsigned m>
 Data (TensorGeneric< n, m > *p, int s)
 Init from pointer to TensorGeneric. More...
 
template<unsigned n, unsigned m>
 Data (TensorGeneric< n, m > &p)
 Init from reference to TensorGeneric. More...
 
template<typename T >
 Data (std::vector< T > &v)
 Init from reference to std::vector. More...
 
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...
 

Public Attributes

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

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

Init from pointer and size.

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

Init from reference.

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

Init from pointer to VectorGeneric.

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

Init from reference to VectorGeneric.

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

Init from pointer to TensorGeneric.

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

Init from reference to TensorGeneric.

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

Init from reference to std::vector.

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

Init from reference to PLMD::Matrix.

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

Init from reference to std::string.

Member Data Documentation

void* PLMD::Communicator::Data::pointer
int PLMD::Communicator::Data::size
MPI_Datatype PLMD::Communicator::Data::type

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