1 // Copyright 2005 Douglas Gregor. 2 3 // Use, modification and distribution is subject to the Boost Software 4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 7 // Message Passing Interface 1.1 -- Section 3. MPI Point-to-point 8 #ifndef BOOST_MPI_DETAIL_POINT_TO_POINT_HPP 9 #define BOOST_MPI_DETAIL_POINT_TO_POINT_HPP 10 11 // For (de-)serializing sends and receives 12 #include <boost/mpi/config.hpp> 13 #include <boost/mpi/packed_oarchive.hpp> 14 #include <boost/mpi/packed_iarchive.hpp> 15 16 namespace boost { namespace mpi { 17 18 class request; 19 class communicator; 20 21 namespace detail { 22 23 /** Sends a packed archive using MPI_Send. */ 24 BOOST_MPI_DECL void 25 packed_archive_send(communicator const& comm, int dest, int tag, 26 const packed_oarchive& ar); 27 28 /** Sends a packed archive using MPI_Isend. 29 * 30 * This routine may split sends into multiple packets. The MPI_Request 31 * for each packet will be placed into the out_requests array, up to 32 * num_out_requests packets. The number of packets sent will be 33 * returned from the function. 34 */ 35 BOOST_MPI_DECL request 36 packed_archive_isend(communicator const& comm, int dest, int tag, 37 const packed_oarchive& ar); 38 39 /** 40 * \overload 41 */ 42 BOOST_MPI_DECL request 43 packed_archive_isend(communicator const& comm, int dest, int tag, 44 const packed_iarchive& ar); 45 46 /** Receives a packed archive using MPI_Recv. */ 47 BOOST_MPI_DECL void 48 packed_archive_recv(communicator const& comm, int source, int tag, packed_iarchive& ar, 49 MPI_Status& status); 50 51 } } } // end namespace boost::mpi::detail 52 53 #endif // BOOST_MPI_DETAIL_POINT_TO_POINT_HPP 54