24namespace kamping::types {
46 !std::is_pointer_v<T_no_const>,
47 "MPI does not support pointer types. Why do you want to transfer a pointer over MPI?"
49 static_assert(!std::is_function_v<T_no_const>,
"MPI does not support function types.");
50 static_assert(!std::is_union_v<T_no_const>,
"MPI does not support union types.");
51 static_assert(!std::is_void_v<T_no_const>,
"There is no MPI datatype corresponding to void.");
55 }
else if constexpr (std::is_enum_v<T_no_const>) {
57 }
else if constexpr (std::is_array_v<T_no_const>) {
78template <
typename T,
typename Enable =
void>
98template <
typename,
typename Enable =
void>
117 template <
typename T>
121 template <
typename T>
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
Forward declarations for contiguous_type and byte_serialized to break include cycles.
TypeCategory
Type groups as defined in Section 6.9.2 of the MPI 4.0 standard.
Definition builtin_types.hpp:32
auto type_dispatcher()
Maps a C++ type T to a type trait for constructing an MPI_Datatype.
Definition mpi_type_traits.hpp:42
static constexpr bool has_auto_dispatched_type_v
Whether the type is handled by the auto-dispatcher kamping::types::type_dispatcher().
Definition mpi_type_traits.hpp:70
static constexpr bool has_static_type_v
true if kamping::types::mpi_type_traits provides a data_type() function.
Definition mpi_type_traits.hpp:107
constexpr bool category_has_to_be_committed(TypeCategory category)
Returns whether an MPI_Datatype of the given category must be committed before use.
Definition builtin_types.hpp:35
Mapping of C++ datatypes to builtin MPI types.
Helper to check if a type is a std::array.
Definition type_helpers.hpp:42
Type tag for indicating that no static type definition exists for a type.
Definition type_helpers.hpp:52
Constructs a contiguous MPI type of N elements of type T using MPI_Type_contiguous.
Definition contiguous_type_fwd.hpp:39
Check if the type has a static type definition, i.e. kamping::types::mpi_type_traits is defined.
Definition mpi_type_traits.hpp:99
static MPI_Datatype data_type()
The MPI_Datatype corresponding to the type T.
Definition mpi_type_traits.hpp:92
The type trait that maps a C++ type T to an MPI_Datatype for the kamping-types module.
Definition mpi_type_traits.hpp:79
Default lookup policy for contiguous_type and struct_type.
Definition mpi_type_traits.hpp:115
static constexpr bool has_type_v
true if the Lookup can resolve an MPI_Datatype for T.
Definition mpi_type_traits.hpp:118
static MPI_Datatype get()
Returns the MPI_Datatype for T.
Definition mpi_type_traits.hpp:122
Internal type helpers for the kamping-types module.