Rheolef
7.1
an efficient C++ finite element environment
mpi_pair_datatype.h
Go to the documentation of this file.
1
#ifndef _RHEO_MPI_PAIR_DATA_TYPE_H
2
#define _RHEO_MPI_PAIR_DATA_TYPE_H
23
// send a pair<T1,T2> via mpi & serialization
24
25
// -------------------------------------------------------------
26
// 1) non-intrusive version of serialization for pair<T1,T2>
27
// -------------------------------------------------------------
28
#include <boost/serialization/utility.hpp>
29
30
// ---------------------------------------------------------------------------
31
// 2) Some serializable types, like pair<size_t,double>, have a fixed amount of
32
// data stored at fixed field positions.
33
// When this is the case, boost::mpi can optimize their serialization and
34
// transmission to avoid extraneous copy operations.
35
// To enable this optimization, we specialize the type trait is_mpi_datatype
36
// this is done in an header file.
37
// ---------------------------------------------------------------------------
38
#include <boost/mpi/datatype.hpp>
39
// ---------------------------------------------------------------------------
40
// 3) remove constness
41
// when is_mpi_datatype<unsigned int> is true
42
// then is_mpi_datatype<unsigned int const> is false
43
// => remove constness is not performed by is_mpi_datatype<T>
44
// we do it here
45
#ifdef _RHEOLEF_HAVE_MPI
46
namespace
boost
{
47
namespace
mpi
{
48
template
<
class
T>
49
struct
is_mpi_datatype<
T
const> : is_mpi_datatype<T> {};
50
}
// namespace mpi
51
}
// namespace boost
52
#endif
// _RHEOLEF_HAVE_MPI
53
54
#endif
// _RHEO_MPI_PAIR_DATA_TYPE_H
T
Expr1::float_type T
Definition:
field_expr.h:261
boost::mpi
Definition:
mpi_pair_datatype.h:47
boost
Definition:
mpi_pair_datatype.h:46