]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use proper types (rather than #defines) in mpi_stub.h. 18108/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 9 Feb 2025 21:47:32 +0000 (14:47 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 9 Feb 2025 21:48:11 +0000 (14:48 -0700)
include/deal.II/base/mpi_stub.h

index 7b079f40a245f2c1abb28a0f7692b024aa346e76..498c92e932ebc79a4718cf637b4229d55b3da6ce 100644 (file)
@@ -31,30 +31,15 @@ using MPI_Comm     = int;
 using MPI_Request  = int;
 using MPI_Datatype = int;
 using MPI_Op       = int;
-#  ifndef MPI_COMM_WORLD
-#    define MPI_COMM_WORLD 0
-#  endif
-#  ifndef MPI_COMM_SELF
-#    define MPI_COMM_SELF 0
-#  endif
-#  ifndef MPI_COMM_NULL
-#    define MPI_COMM_NULL 0
-#  endif
-#  ifndef MPI_REQUEST_NULL
-#    define MPI_REQUEST_NULL 0
-#  endif
-#  ifndef MPI_MIN
-#    define MPI_MIN 0
-#  endif
-#  ifndef MPI_MAX
-#    define MPI_MAX 0
-#  endif
-#  ifndef MPI_SUM
-#    define MPI_SUM 0
-#  endif
-#  ifndef MPI_LOR
-#    define MPI_LOR 0
-#  endif
-#endif
 
+constexpr MPI_Comm    MPI_COMM_WORLD   = 0;
+constexpr MPI_Comm    MPI_COMM_SELF    = 0;
+constexpr MPI_Comm    MPI_COMM_NULL    = 0;
+constexpr MPI_Request MPI_REQUEST_NULL = 0;
+constexpr MPI_Op      MPI_MIN          = 0;
+constexpr MPI_Op      MPI_MAX          = 0;
+constexpr MPI_Op      MPI_SUM          = 0;
+constexpr MPI_Op      MPI_LOR          = 0;
+
+#endif
 #endif

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.