Re: [OMPI users] Redefining MPI_BOOL depending of sizeof(bool)

2018-03-29 Thread Jeff Squyres (jsquyres)
> Am 29.03.2018 um 09:58 schrieb Florian Lindner: >> #define MPI_BOOL MPI_Select_unsigned_integer_datatype::datatype >> >> It redefines MPI_BOOL based on the size of bool. I wonder if this is needed >> and why? >> >> I was speculating that the compiler could pack multiple bools in

Re: [OMPI users] Redefining MPI_BOOL depending of sizeof(bool)

2018-03-29 Thread Florian Lindner
Am 29.03.2018 um 09:58 schrieb Florian Lindner: > #define MPI_BOOL MPI_Select_unsigned_integer_datatype::datatype > > > It redefines MPI_BOOL based on the size of bool. I wonder if this is needed > and why? > > I was speculating that the compiler could pack multiple bools in

[OMPI users] Redefining MPI_BOOL depending of sizeof(bool)

2018-03-29 Thread Florian Lindner
Hello, in a code that I am currently reading I have found that code: template struct MPI_Select_unsigned_integer_datatype; template <> struct MPI_Select_unsigned_integer_datatype<1> { static MPI_Datatype datatype; }; MPI_Datatype MPI_Select_unsigned_integer_datatype<1>::datatype =