Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_BYTE has some specific requirements, and doesn't allow most operations on it
authorAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 17:29:20 +0000 (19:29 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 18:03:31 +0000 (20:03 +0200)
src/smpi/mpi/smpi_op.cpp

index cda3387..89df84e 100644 (file)
@@ -63,7 +63,6 @@ APPLY_OP_LOOP(MPI_UNSIGNED, unsigned int,op)\
 APPLY_OP_LOOP(MPI_UNSIGNED_LONG, unsigned long,op)\
 APPLY_OP_LOOP(MPI_UNSIGNED_LONG_LONG, unsigned long long,op)\
 APPLY_OP_LOOP(MPI_WCHAR, wchar_t,op)\
-APPLY_OP_LOOP(MPI_BYTE, int8_t,op)\
 APPLY_OP_LOOP(MPI_INT8_T, int8_t,op)\
 APPLY_OP_LOOP(MPI_INT16_T, int16_t,op)\
 APPLY_OP_LOOP(MPI_INT32_T, int32_t,op)\
@@ -84,6 +83,9 @@ APPLY_OP_LOOP(MPI_COUNT, long long,op)
 #define APPLY_BOOL_OP_LOOP(op)\
 APPLY_OP_LOOP(MPI_C_BOOL, bool,op)
 
+#define APPLY_BYTE_OP_LOOP(op)\
+APPLY_OP_LOOP(MPI_BYTE, int8_t,op)
+
 #define APPLY_FLOAT_OP_LOOP(op)\
 APPLY_OP_LOOP(MPI_FLOAT, float,op)\
 APPLY_OP_LOOP(MPI_DOUBLE, double,op)\
@@ -177,6 +179,7 @@ static void band_func(void *a, void *b, int *length, MPI_Datatype * datatype)
 {
   APPLY_BASIC_OP_LOOP(BAND_OP)
   APPLY_BOOL_OP_LOOP(BAND_OP)
+  APPLY_BYTE_OP_LOOP(BAND_OP)
   APPLY_END_OP_LOOP(BAND_OP)
 }
 
@@ -184,6 +187,7 @@ static void bor_func(void *a, void *b, int *length, MPI_Datatype * datatype)
 {
   APPLY_BASIC_OP_LOOP(BOR_OP)
   APPLY_BOOL_OP_LOOP(BOR_OP)
+  APPLY_BYTE_OP_LOOP(BOR_OP)
   APPLY_END_OP_LOOP(BOR_OP)
 }
 
@@ -191,6 +195,7 @@ static void bxor_func(void *a, void *b, int *length, MPI_Datatype * datatype)
 {
   APPLY_BASIC_OP_LOOP(BXOR_OP)
   APPLY_BOOL_OP_LOOP(BXOR_OP)
+  APPLY_BYTE_OP_LOOP(BXOR_OP)
   APPLY_END_OP_LOOP(BXOR_OP)
 }