]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 { namespace detail { | |
17 | ||
18 | /** Sends a packed archive using MPI_Send. */ | |
19 | BOOST_MPI_DECL void | |
20 | packed_archive_send(MPI_Comm comm, int dest, int tag, | |
21 | const packed_oarchive& ar); | |
22 | ||
23 | /** Sends a packed archive using MPI_Isend. | |
24 | * | |
25 | * This routine may split sends into multiple packets. The MPI_Request | |
26 | * for each packet will be placed into the out_requests array, up to | |
27 | * num_out_requests packets. The number of packets sent will be | |
28 | * returned from the function. | |
29 | * | |
30 | * @pre num_out_requests >= 2 | |
31 | */ | |
32 | BOOST_MPI_DECL int | |
33 | packed_archive_isend(MPI_Comm comm, int dest, int tag, | |
34 | const packed_oarchive& ar, | |
35 | MPI_Request* out_requests, int num_out_requests); | |
36 | ||
37 | /** | |
38 | * \overload | |
39 | */ | |
40 | BOOST_MPI_DECL int | |
41 | packed_archive_isend(MPI_Comm comm, int dest, int tag, | |
42 | const packed_iarchive& ar, | |
43 | MPI_Request* out_requests, int num_out_requests); | |
44 | ||
45 | /** Receives a packed archive using MPI_Recv. */ | |
46 | BOOST_MPI_DECL void | |
47 | packed_archive_recv(MPI_Comm comm, int source, int tag, packed_iarchive& ar, | |
48 | MPI_Status& status); | |
49 | ||
50 | } } } // end namespace boost::mpi::detail | |
51 | ||
52 | #endif // BOOST_MPI_DETAIL_POINT_TO_POINT_HPP |