Skip to content

Commit

Permalink
Merge pull request #13795 from drwells/add-mpi-bool-instantiation
Browse files Browse the repository at this point in the history
Add some missing MPI boolean instantiations.
  • Loading branch information
kronbichler committed May 23, 2022
2 parents fac6d58 + c7e662a commit 61fa61c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions source/base/mpi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,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 &);

Expand Down

0 comments on commit 61fa61c

Please sign in to comment.