|
KaMPIng 0.2.1
(Near) zero-overhead MPI wrapper for C++
|
Standalone module for mapping C++ types to MPI datatypes. More...
Enumerations | |
| enum class | kamping::types::TypeCategory { integer , floating , complex , logical , byte , character , struct_like , contiguous } |
| Type groups as defined in Section 6.9.2 of the MPI 4.0 standard. | |
Functions | |
| constexpr bool | kamping::types::category_has_to_be_committed (TypeCategory category) |
Returns whether an MPI_Datatype of the given category must be committed before use. | |
| template<typename T > | |
| auto | kamping::types::type_dispatcher () |
Maps a C++ type T to a type trait for constructing an MPI_Datatype. | |
| static MPI_Datatype | kamping::types::contiguous_type< T, N, Lookup >::data_type () |
Returns the MPI_Datatype for a contiguous block of N elements of type T. | |
Variables | |
| template<typename T > | |
| constexpr bool | kamping::types::is_builtin_type_v = builtin_type<T>::value |
| Helper variable template for builtin_type. | |
| template<typename T > | |
| static constexpr bool | kamping::types::has_auto_dispatched_type_v |
| Whether the type is handled by the auto-dispatcher kamping::types::type_dispatcher(). | |
| template<typename T > | |
| static constexpr bool | kamping::types::has_static_type_v = has_static_type<T>::value |
true if kamping::types::mpi_type_traits provides a data_type() function. | |
Standalone module for mapping C++ types to MPI datatypes.
Provides type_dispatcher, mpi_type_traits, contiguous_type, struct_type, ScopedDatatype, and kabool.
Can be consumed independently of the KaMPIng communicator via the kamping::types CMake target.
See kamping-types for the full standalone documentation including CMake setup, type dispatch rules, and custom type extension examples.
Maps a C++ type T to a type trait for constructing an MPI_Datatype.
| C++ type | Result |
|---|---|
MPI builtin (int, double, …, kabool) | builtin_type<T> |
| Enum | dispatches to type_dispatcher<underlying_type>() |
T[N], std::array<T, N> | contiguous_type<T, N> |
| Everything else | internal::no_matching_type |
Specialize kamping::types::mpi_type_traits to handle additional types.
T. Whether the type is handled by the auto-dispatcher kamping::types::type_dispatcher().