From bb7b2b4ef3e73f199f4595ea6a1f8a6096cb810c Mon Sep 17 00:00:00 2001 From: degomme Date: Sun, 12 Feb 2017 20:08:12 +0100 Subject: [PATCH] Separate boolean from others, as gcc > 6 complains on some operations. And actually, this follows the standard. --- src/smpi/smpi_mpi_dt.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpi_mpi_dt.cpp b/src/smpi/smpi_mpi_dt.cpp index 81cfd4e13c..1268a50187 100644 --- a/src/smpi/smpi_mpi_dt.cpp +++ b/src/smpi/smpi_mpi_dt.cpp @@ -1203,7 +1203,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_C_BOOL, bool,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)\ @@ -1220,6 +1219,9 @@ APPLY_OP_LOOP(MPI_INTEGER2, int16_t,op)\ APPLY_OP_LOOP(MPI_INTEGER4, int32_t,op)\ APPLY_OP_LOOP(MPI_INTEGER8, int64_t,op) +#define APPLY_BOOL_OP_LOOP(op)\ +APPLY_OP_LOOP(MPI_C_BOOL, bool,op) + #define APPLY_FLOAT_OP_LOOP(op)\ APPLY_OP_LOOP(MPI_FLOAT, float,op)\ APPLY_OP_LOOP(MPI_DOUBLE, double,op)\ @@ -1284,36 +1286,42 @@ static void prod_func(void *a, void *b, int *length, MPI_Datatype * datatype) static void land_func(void *a, void *b, int *length, MPI_Datatype * datatype) { APPLY_BASIC_OP_LOOP(LAND_OP) + APPLY_BOOL_OP_LOOP(LAND_OP) APPLY_END_OP_LOOP(LAND_OP) } static void lor_func(void *a, void *b, int *length, MPI_Datatype * datatype) { APPLY_BASIC_OP_LOOP(LOR_OP) + APPLY_BOOL_OP_LOOP(LOR_OP) APPLY_END_OP_LOOP(LOR_OP) } static void lxor_func(void *a, void *b, int *length, MPI_Datatype * datatype) { APPLY_BASIC_OP_LOOP(LXOR_OP) + APPLY_BOOL_OP_LOOP(LXOR_OP) APPLY_END_OP_LOOP(LXOR_OP) } 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_END_OP_LOOP(BAND_OP) } 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_END_OP_LOOP(BOR_OP) } 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_END_OP_LOOP(BXOR_OP) } -- 2.20.1