point_to_point.hpp 1.7 KB

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