Skip to content

Commit 12c81d4

Browse files
committed
Use MPI_BYTE for unknown types
1 parent fc25da1 commit 12c81d4

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/impl/KokkosComm_types.hpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ template <typename Scalar>
2525
MPI_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,10 +96,8 @@ MPI_Datatype mpi_type() {
9996
else if constexpr (std::is_same_v<T, Kokkos::complex<double>>)
10097
return MPI_DOUBLE_COMPLEX;
10198

102-
else {
103-
static_assert(std::is_void_v<T>, "mpi_type not implemented");
104-
return MPI_CHAR; // unreachable
105-
}
99+
else
100+
return MPI_BYTE;
106101
}
107102

108103
template <typename Scalar>

0 commit comments

Comments
 (0)