TRIQS/mpi 1.3.0
C++ interface to MPI
Loading...
Searching...
No Matches
mpi::mpi_type_from_tie< T >

#include <mpi/datatypes.hpp>

Detailed Description

template<typename T>
struct mpi::mpi_type_from_tie< T >

Create an MPI_Datatype from some struct.

It is assumed that there is a free function tie_data which returns a tuple containing the data members of the given type. The intended use is as a base class for a specialization of mpi::mpi_type:

// type to use for MPI communication
struct foo {
double x;
int y;
};
// provide a tie_data function
auto tie_data(foo f) {
return std::tie(f.x, f.y);
}
// provide a specialization of mpi_type
template <> struct mpi::mpi_type<foo> : mpi::mpi_type_from_tie<foo> {};
Create an MPI_Datatype from some struct.
Map C++ datatypes to the corresponding MPI datatypes.
Definition datatypes.hpp:57
Template Parameters
TType to be converted to an MPI_Datatype.

Definition at line 166 of file datatypes.hpp.


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