mpi_pair_datatype.h
Go to the documentation of this file.
#ifndef _RHEO_MPI_PAIR_DATA_TYPE_H
#define _RHEO_MPI_PAIR_DATA_TYPE_H
// send a pair<T1,T2> via mpi & serialization
// -------------------------------------------------------------
// 1) non-intrusive version of serialization for pair<T1,T2>
// -------------------------------------------------------------
#include <boost/serialization/utility.hpp>
// ---------------------------------------------------------------------------
// 2) Some serializable types, like pair<size_t,double>, have a fixed amount of
// data stored at fixed field positions.
// When this is the case, boost::mpi can optimize their serialization and
// transmission to avoid extraneous copy operations.
// To enable this optimization, we specialize the type trait is_mpi_datatype
// this is done in an header file.
// ---------------------------------------------------------------------------
#include <boost/mpi/datatype.hpp>
// ---------------------------------------------------------------------------
// 3) remove constness
// when is_mpi_datatype<unsigned int> is true
// then is_mpi_datatype<unsigned int const> is false
// => remove constness is not performed by is_mpi_datatype<T>
// we do it here
#ifdef _RHEOLEF_HAVE_MPI
namespace boost {
namespace mpi {
template <class T>
struct is_mpi_datatype<T const> : is_mpi_datatype<T> {};
} // namespace mpi
} // namespace boost
#endif // _RHEOLEF_HAVE_MPI
#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