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