diff --git a/src/impl/KokkosComm_types.hpp b/src/impl/KokkosComm_types.hpp index 548f21de..897816c2 100644 --- a/src/impl/KokkosComm_types.hpp +++ b/src/impl/KokkosComm_types.hpp @@ -25,10 +25,7 @@ template MPI_Datatype mpi_type() { using T = std::decay_t; - if constexpr (std::is_same_v) - return MPI_BYTE; - - else if constexpr (std::is_same_v) + if constexpr (std::is_same_v) return MPI_CHAR; else if constexpr (std::is_same_v) return MPI_UNSIGNED_CHAR; @@ -99,6 +96,9 @@ MPI_Datatype mpi_type() { else if constexpr (std::is_same_v>) return MPI_DOUBLE_COMPLEX; + else if constexpr (std::is_trivially_copyable_v) + return MPI_BYTE; + else { static_assert(std::is_void_v, "mpi_type not implemented"); return MPI_CHAR; // unreachable