RO Backend: Add support for char, signed char and unsigned char

This commit is contained in:
avinashkethineedi
2025-02-12 20:10:03 +00:00
parent 495cd6970b
commit 540cd4b918
3 changed files with 10 additions and 2 deletions
+2
View File
@@ -50,6 +50,8 @@ enum ro_net_cmds {
enum ro_net_types {
RO_NET_FLOAT,
RO_NET_CHAR,
RO_NET_SIGNED_CHAR,
RO_NET_UNSIGNED_CHAR,
RO_NET_DOUBLE,
RO_NET_INT,
RO_NET_LONG,
@@ -41,12 +41,12 @@ struct GetROType<char> {
template <>
struct GetROType<unsigned char> {
static constexpr ro_net_types Type{RO_NET_CHAR};
static constexpr ro_net_types Type{RO_NET_UNSIGNED_CHAR};
};
template <>
struct GetROType<signed char> {
static constexpr ro_net_types Type{RO_NET_CHAR};
static constexpr ro_net_types Type{RO_NET_SIGNED_CHAR};
};
template <>
+6
View File
@@ -384,6 +384,12 @@ static MPI_Datatype convertType(ro_net_types type) {
return MPI_SHORT;
case RO_NET_LONG_DOUBLE:
return MPI_LONG_DOUBLE;
case RO_NET_CHAR:
return MPI_CHAR;
case RO_NET_SIGNED_CHAR:
return MPI_SIGNED_CHAR;
case RO_NET_UNSIGNED_CHAR:
return MPI_UNSIGNED_CHAR;
default:
fprintf(stderr, "Unknown rocSHMEM type MPI conversion %d\n", type);
abort();