23 #include "openPMD/config.hpp"
25 #include "openPMD/auxiliary/TypeTraits.hpp"
31 #include <type_traits>
33 namespace openPMD::auxiliary
40 constexpr MPI_Datatype openPMD_MPI_type()
42 using T_decay = std::decay_t<T>;
43 if constexpr (std::is_same_v<T_decay, char>)
47 else if constexpr (std::is_same_v<T_decay, unsigned>)
51 else if constexpr (std::is_same_v<T_decay, unsigned long>)
53 return MPI_UNSIGNED_LONG;
55 else if constexpr (std::is_same_v<T_decay, unsigned long long>)
57 return MPI_UNSIGNED_LONG_LONG;
62 dependent_false_v<T>,
"openPMD_MPI_type: Unsupported type.");