SOPT
Sparse OPTimisation
registered_types.cc
Go to the documentation of this file.
2 
3 namespace sopt::mpi {
4 MPIType const Type<std::int8_t>::value = MPI_INT8_T;
5 MPIType const Type<std::int16_t>::value = MPI_INT16_T;
6 MPIType const Type<std::int32_t>::value = MPI_INT32_T;
7 MPIType const Type<std::int64_t>::value = MPI_INT64_T;
8 MPIType const Type<std::uint8_t>::value = MPI_UINT8_T;
9 MPIType const Type<std::uint16_t>::value = MPI_UINT16_T;
10 MPIType const Type<std::uint32_t>::value = MPI_UINT32_T;
11 MPIType const Type<std::uint64_t>::value = MPI_UINT64_T;
12 
13 #ifndef SOPT_CHAR_ARCH
14 MPIType const Type<char>::value = MPI_CHAR;
15 #endif
16 #ifndef SOPT_LONG_ARCH
17 MPIType const Type<signed long>::value = MPI_LONG;
18 #endif
19 #ifndef SOPT_ULONG_ARCH
20 MPIType const Type<unsigned long>::value = MPI_UNSIGNED_LONG;
21 #endif
22 
23 MPIType const Type<float>::value = MPI_FLOAT;
24 MPIType const Type<double>::value = MPI_DOUBLE;
25 MPIType const Type<long double>::value = MPI_LONG_DOUBLE;
26 MPIType const Type<std::complex<float>>::value = MPI_C_FLOAT_COMPLEX;
27 MPIType const Type<std::complex<double>>::value = MPI_C_DOUBLE_COMPLEX;
28 MPIType const Type<std::complex<long double>>::value = MPI_C_LONG_DOUBLE_COMPLEX;
29 
30 static_assert(is_registered_type<int>::value, "Checking int is registered");
31 static_assert(is_registered_type<std::complex<double>>::value,
32  "Checking complex double is registered");
33 static_assert(not is_registered_type<std::complex<int>>::value,
34  "Checking complex int is NOT registered");
35 } // namespace sopt::mpi