TRIQS/mpi 1.3.0
C++ interface to MPI
Loading...
Searching...
No Matches
datatypes.hpp File Reference
#include "./utils.hpp"
#include <mpi.h>
#include <algorithm>
#include <array>
#include <complex>
#include <cstdlib>
#include <tuple>
#include <type_traits>
#include <utility>

Detailed Description

Provides utilities to map C++ datatypes to MPI datatypes.

Definition in file datatypes.hpp.

Go to the source code of this file.

Classes

struct  mpi::mpi_type< T >
 Map C++ datatypes to the corresponding MPI datatypes. More...
 
struct  mpi::mpi_type< bool >
 Specialization of mpi_type for bool. More...
 
struct  mpi::mpi_type< char >
 Specialization of mpi_type for char. More...
 
struct  mpi::mpi_type< const T >
 Specialization of mpi::mpi_type for const types. More...
 
struct  mpi::mpi_type< double >
 Specialization of mpi_type for double. More...
 
struct  mpi::mpi_type< E >
 Specialization of mpi::mpi_type for enum types. More...
 
struct  mpi::mpi_type< float >
 Specialization of mpi_type for float. More...
 
struct  mpi::mpi_type< int >
 Specialization of mpi_type for int. More...
 
struct  mpi::mpi_type< long >
 Specialization of mpi_type for long. More...
 
struct  mpi::mpi_type< long long >
 Specialization of mpi_type for long long. More...
 
struct  mpi::mpi_type< S >
 Specialization of mpi::mpi_type for serializable types. More...
 
struct  mpi::mpi_type< std::complex< double > >
 Specialization of mpi_type for std::complex<double>. More...
 
struct  mpi::mpi_type< std::tuple< Ts... > >
 Specialization of mpi::mpi_type for std::tuple. More...
 
struct  mpi::mpi_type< U >
 Create an MPI_Datatype from some struct. More...
 
struct  mpi::mpi_type< unsigned int >
 Specialization of mpi_type for unsigned int. More...
 
struct  mpi::mpi_type< unsigned long >
 Specialization of mpi_type for unsigned long. More...
 
struct  mpi::mpi_type< unsigned long long >
 Specialization of mpi_type for unsigned long long. More...
 

Concepts

concept  mpi::Serializable
 A concept that checks if objects of a type can be serialized and deserialized.
 

Functions

template<Serializable T>
MPI_Datatype mpi::get_mpi_type (const T &obj)
 Create an MPI_Datatype from a serializable type.
 
template<typename... Ts>
MPI_Datatype mpi::get_mpi_type (std::tuple< Ts... > tup)
 Create a new MPI_Datatype from a tuple.
 

Variables

template<typename T, typename = void>
constexpr bool mpi::has_mpi_type = false
 Type trait to check if a type T has a corresponding MPI datatype, i.e. if mpi::mpi_type has been specialized.
 
template<typename T>
constexpr bool mpi::has_mpi_type< T, std::void_t< decltype(mpi_type< T >::get())> > = true
 Specialization of mpi::has_mpi_type for types which have a corresponding MPI datatype.