1 #ifndef SOPT_MPI_TYPES_H
2 #define SOPT_MPI_TYPES_H
4 #include "sopt/config.h"
10 using MPIType = decltype(MPI_CHAR);
19 static_assert(not std::is_same<char, std::int8_t>::value,
"");
20 #define SOPT_MACRO(TYPE) \
23 static const MPIType value; \
34 #ifndef SOPT_CHAR_ARCH
37 #ifndef SOPT_LONG_ARCH
40 #ifndef SOPT_ULONG_ARCH
54 inline constexpr MPIType registered_type(T
const &) {
55 return Type<T>::value;
59 template <
typename... Ts>
67 template <
typename... Ts>
68 using void_t =
typename make_void<Ts...>::type;
71 template <
typename T,
typename = details::
void_t<>>
72 class is_registered_type :
public std::false_type {};
74 class is_registered_type<T, details::void_t<decltype(Type<T>::value)>> :
public std::true_type {};
#define SOPT_MACRO(NAME, TYPE)