]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add some missing MPI boolean instantiations. 13795/head
authorDavid Wells <drwells@email.unc.edu>
Mon, 23 May 2022 16:57:38 +0000 (12:57 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 23 May 2022 16:57:38 +0000 (12:57 -0400)
source/base/mpi.cc

index aa582c6bf95ce4ff73f4cb7fc6491485584c6d66..12e2f1ff4e965cca090294451f72ec1050cc557e 100644 (file)
@@ -1197,6 +1197,42 @@ namespace Utilities
 
 #ifndef DOXYGEN
     // explicit instantiations
+
+    // booleans aren't in MPI_SCALARS
+    template bool
+    reduce(const bool &,
+           const MPI_Comm &,
+           const std::function<bool(const bool &, const bool &)> &,
+           const unsigned int);
+
+    template std::vector<bool>
+    reduce(const std::vector<bool> &,
+           const MPI_Comm &,
+           const std::function<std::vector<bool>(const std::vector<bool> &,
+                                                 const std::vector<bool> &)> &,
+           const unsigned int);
+
+    template bool
+    all_reduce(const bool &,
+               const MPI_Comm &,
+               const std::function<bool(const bool &, const bool &)> &);
+
+    template std::vector<bool>
+    all_reduce(
+      const std::vector<bool> &,
+      const MPI_Comm &,
+      const std::function<std::vector<bool>(const std::vector<bool> &,
+                                            const std::vector<bool> &)> &);
+
+    // We need an explicit instantiation of this for the same reason as the
+    // other types described in mpi.inst.in
+    template void
+    internal::all_reduce<bool>(const MPI_Op &,
+                               const ArrayView<const bool> &,
+                               const MPI_Comm &,
+                               const ArrayView<bool> &);
+
+
     template bool
     logical_or<bool>(const bool &, const MPI_Comm &);
 

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.