File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,7 @@ template <typename Scalar>
2525MPI_Datatype mpi_type () {
2626 using T = std::decay_t <Scalar>;
2727
28- if constexpr (std::is_same_v<T, std::byte>)
29- return MPI_BYTE;
30-
31- else if constexpr (std::is_same_v<T, char >)
28+ if constexpr (std::is_same_v<T, char >)
3229 return MPI_CHAR;
3330 else if constexpr (std::is_same_v<T, unsigned char >)
3431 return MPI_UNSIGNED_CHAR;
@@ -99,6 +96,9 @@ MPI_Datatype mpi_type() {
9996 else if constexpr (std::is_same_v<T, Kokkos::complex <double >>)
10097 return MPI_DOUBLE_COMPLEX;
10198
99+ else if constexpr (std::is_trivially_copyable_v<T>)
100+ return MPI_BYTE;
101+
102102 else {
103103 static_assert (std::is_void_v<T>, " mpi_type not implemented" );
104104 return MPI_CHAR; // unreachable
You can’t perform that action at this time.
0 commit comments