diff --git a/src/KokkosComm.hpp b/src/KokkosComm.hpp index 342a2dcb..c67fc24e 100644 --- a/src/KokkosComm.hpp +++ b/src/KokkosComm.hpp @@ -23,16 +23,19 @@ #include "KokkosComm_recv.hpp" #include "KokkosComm_send.hpp" #include "KokkosComm_alltoall.hpp" +#include "KokkosComm_barrier.hpp" #include "KokkosComm_concepts.hpp" #include "KokkosComm_comm_mode.hpp" #include namespace KokkosComm { + using Impl::alltoall; +using Impl::barrier; using Impl::irecv; using Impl::isend; using Impl::recv; using Impl::send; -} // namespace KokkosComm \ No newline at end of file +} // namespace KokkosComm diff --git a/src/impl/KokkosComm_barrier.hpp b/src/impl/KokkosComm_barrier.hpp index 20ccdc6e..44580086 100644 --- a/src/impl/KokkosComm_barrier.hpp +++ b/src/impl/KokkosComm_barrier.hpp @@ -18,16 +18,14 @@ #include -#include "KokkosComm_pack_traits.hpp" -#include "KokkosComm_traits.hpp" +#include "KokkosComm_concepts.hpp" // impl #include "KokkosComm_include_mpi.hpp" -#include "KokkosComm_types.hpp" namespace KokkosComm::Impl { -void barrier(MPI_Comm comm) { +inline void barrier(MPI_Comm comm) { Kokkos::Tools::pushRegion("KokkosComm::Impl::barrier"); MPI_Barrier(comm); Kokkos::Tools::popRegion(); @@ -39,4 +37,5 @@ void barrier(const ExecSpace &space, MPI_Comm comm) { space.fence("KokkosComm::Impl::barrier"); barrier(comm); } + } // namespace KokkosComm::Impl diff --git a/unit_tests/test_barrier.cpp b/unit_tests/test_barrier.cpp index 843a2a92..c9aa95ca 100644 --- a/unit_tests/test_barrier.cpp +++ b/unit_tests/test_barrier.cpp @@ -16,14 +16,15 @@ #include -#include "KokkosComm_barrier.hpp" +#include "KokkosComm.hpp" namespace { + TEST(Barrier, 0) { int rank, size; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); - - KokkosComm::Impl::barrier(Kokkos::DefaultExecutionSpace(), MPI_COMM_WORLD); + KokkosComm::barrier(Kokkos::DefaultExecutionSpace(), MPI_COMM_WORLD); } + } // namespace