libMesh
Public Member Functions | Protected Attributes | List of all members
libMesh::Parallel::DataType Class Reference

Encapsulates the MPI_Datatype. More...

#include <parallel.h>

Inheritance diagram for libMesh::Parallel::DataType:
[legend]

Public Member Functions

 DataType ()
 
 DataType (const DataType &other)
 
 DataType (const data_type &type)
 
 DataType (const DataType &other, unsigned int count)
 
 DataType (const DataType &, unsigned int)
 
DataTypeoperator= (const DataType &other)
 
DataTypeoperator= (const data_type &type)
 
 operator const data_type & () const
 
 operator data_type & ()
 
void commit ()
 
void free ()
 

Protected Attributes

data_type _datatype
 

Detailed Description

Encapsulates the MPI_Datatype.

Definition at line 289 of file parallel.h.

Constructor & Destructor Documentation

libMesh::Parallel::DataType::DataType ( )
libMesh::Parallel::DataType::DataType ( const DataType other)

Definition at line 294 of file parallel.h.

294  :
295  _datatype(other._datatype)
296  {}
libMesh::Parallel::DataType::DataType ( const data_type type)

Definition at line 298 of file parallel.h.

298  :
299  _datatype(type)
300  {}
libMesh::Parallel::DataType::DataType ( const DataType other,
unsigned int  count 
)

Definition at line 303 of file parallel.h.

References _datatype.

304  {
305  // FIXME - if we nest an inner type here will we run into bug
306  // https://github.com/libMesh/libmesh/issues/631 again?
307  MPI_Type_contiguous(count, other._datatype, &_datatype);
308  this->commit();
309  }
libMesh::Parallel::DataType::DataType ( const DataType ,
unsigned  int 
)

Definition at line 311 of file parallel.h.

312  {
313  }

Member Function Documentation

void libMesh::Parallel::DataType::commit ( )

Definition at line 334 of file parallel.h.

335  {
336 #ifdef LIBMESH_HAVE_MPI
337  MPI_Type_commit (&_datatype);
338 #endif
339  }
void libMesh::Parallel::DataType::free ( )
libMesh::Parallel::DataType::operator const data_type & ( ) const

Definition at line 322 of file parallel.h.

323  { return _datatype; }
libMesh::Parallel::DataType::operator data_type & ( )

Definition at line 325 of file parallel.h.

326  { return _datatype; }
DataType& libMesh::Parallel::DataType::operator= ( const DataType other)

Definition at line 316 of file parallel.h.

References _datatype.

317  { _datatype = other._datatype; return *this; }
DataType& libMesh::Parallel::DataType::operator= ( const data_type type)

Definition at line 319 of file parallel.h.

320  { _datatype = type; return *this; }

Member Data Documentation

data_type libMesh::Parallel::DataType::_datatype
protected

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