11 template <
typename T>
constexpr MPI_Datatype
get_type() noexcept
13 MPI_Datatype datatype{};
15 using _type = std::remove_const_t<std::remove_reference_t<T>>;
17 if constexpr (std::is_same_v<_type, size_t>)
19 datatype = MPI_UNSIGNED_LONG;
21 else if constexpr (std::is_same_v<_type, double>)
23 datatype = MPI_DOUBLE;
25 else if constexpr (std::is_same_v<_type, int>)
29 else if constexpr (std::is_same_v<_type, bool>)
31 datatype = MPI_CXX_BOOL;
33 else if constexpr (std::is_same_v<_type, char> ||
34 std::is_same_v<_type, WrapMPI::SIGNALS>)
40 []<
bool flag =
false>()
42 static_assert(flag,
"no match");