From a96b87472e693da923d1ad95d4706353651737e0 Mon Sep 17 00:00:00 2001 From: Alain O Miniussi Date: Mon, 28 Oct 2019 19:42:13 +0100 Subject: [PATCH 1/2] Be less intrusive into request implementation. refs #100 --- src/communicator.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/communicator.cpp b/src/communicator.cpp index 07853857..b7163d5b 100644 --- a/src/communicator.cpp +++ b/src/communicator.cpp @@ -328,9 +328,10 @@ bool operator==(const communicator& comm1, const communicator& comm2) #if BOOST_MPI_VERSION >= 3 request communicator::ibarrier() const { - request::trivial_handler* handler = new request::trivial_handler; - BOOST_MPI_CHECK_RESULT(MPI_Ibarrier, (*this, &handler->m_request)); - return request(handler); + MPI_Request *c_ptr; + request req = request::make_trivial(c_ptr); + BOOST_MPI_CHECK_RESULT(MPI_Ibarrier, (*this, c_ptr)); + return req; } #endif From c590c8564c678e5758a3a66c23f1c8eb3e8bda63 Mon Sep 17 00:00:00 2001 From: Alain O Miniussi Date: Mon, 28 Oct 2019 19:46:55 +0100 Subject: [PATCH 2/2] Remove un necessary friend refs #100 --- include/boost/mpi/detail/request_handlers.hpp | 3 --- include/boost/mpi/request.hpp | 1 - 2 files changed, 4 deletions(-) diff --git a/include/boost/mpi/detail/request_handlers.hpp b/include/boost/mpi/detail/request_handlers.hpp index 2f14a24f..50a22ec3 100644 --- a/include/boost/mpi/detail/request_handlers.hpp +++ b/include/boost/mpi/detail/request_handlers.hpp @@ -509,9 +509,6 @@ class BOOST_MPI_DECL request::trivial_handler : public request::handler { private: friend class request; -#if BOOST_MPI_VERSION >= 3 - friend class communicator; -#endif MPI_Request m_request; }; diff --git a/include/boost/mpi/request.hpp b/include/boost/mpi/request.hpp index 6818b613..3a155db8 100644 --- a/include/boost/mpi/request.hpp +++ b/include/boost/mpi/request.hpp @@ -155,7 +155,6 @@ class BOOST_MPI_DECL request template class legacy_dynamic_primitive_array_handler; #if BOOST_MPI_VERSION >= 3 template class probe_handler; - friend class communicator; #endif private: