libMesh::Parallel::DataType Class Reference

#include <data_type.h>

Inheritance diagram for libMesh::Parallel::DataType:

Public Member Functions

 DataType ()
 
 DataType (const DataType &other)
 
 DataType (const data_type &type)
 
 DataType (const DataType &other, unsigned int count)
 
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 63 of file data_type.h.

Constructor & Destructor Documentation

◆ DataType() [1/4]

libMesh::Parallel::DataType::DataType ( )
inline

◆ DataType() [2/4]

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

Definition at line 68 of file data_type.h.

68  :
69  _datatype(other._datatype)
70  {}

◆ DataType() [3/4]

libMesh::Parallel::DataType::DataType ( const data_type type)
inline

Definition at line 72 of file data_type.h.

72  :
73  _datatype(type)
74  {}

◆ DataType() [4/4]

libMesh::Parallel::DataType::DataType ( const DataType other,
unsigned int  count 
)
inline

Definition at line 76 of file data_type.h.

References _datatype, commit(), and libMesh::libmesh_ignore().

77  {
78  // FIXME - if we nest an inner type here will we run into bug
79  // https://github.com/libMesh/libmesh/issues/631 again?
80  libmesh_call_mpi(MPI_Type_contiguous(count, other._datatype, &_datatype));
81  libmesh_ignore(other, count); // ifndef LIBMESH_HAVE_MPI
82  this->commit();
83  }
void libmesh_ignore(const Args &...)

Member Function Documentation

◆ commit()

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

Definition at line 103 of file data_type.h.

References _datatype.

Referenced by DataType(), libMesh::Parallel::StandardType< std::pair< T1, T2 > >::StandardType(), and libMesh::Parallel::StandardType< std::tuple< Types... > >::StandardType().

104  {
105  libmesh_call_mpi
106  (MPI_Type_commit (&_datatype));
107  }

◆ free()

◆ operator const data_type &()

libMesh::Parallel::DataType::operator const data_type & ( ) const
inline

Definition at line 91 of file data_type.h.

References _datatype.

92  { return _datatype; }

◆ operator data_type &()

libMesh::Parallel::DataType::operator data_type & ( )
inline

Definition at line 94 of file data_type.h.

References _datatype.

95  { return _datatype; }

◆ operator=() [1/2]

DataType& libMesh::Parallel::DataType::operator= ( const DataType other)
inline

Definition at line 85 of file data_type.h.

References _datatype.

86  { _datatype = other._datatype; return *this; }

◆ operator=() [2/2]

DataType& libMesh::Parallel::DataType::operator= ( const data_type type)
inline

Definition at line 88 of file data_type.h.

References _datatype.

89  { _datatype = type; return *this; }

Member Data Documentation

◆ _datatype


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