point_to_point.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 {
  13. class request;
  14. class communicator;
  15. namespace detail {
  16. /** Sends a packed archive using MPI_Send. */
  17. BOOST_MPI_DECL void
  18. packed_archive_send(communicator const& comm, int dest, int tag,
  19. const packed_oarchive& ar);
  20. /** Sends a packed archive using MPI_Isend.
  21. *
  22. * This routine may split sends into multiple packets. The MPI_Request
  23. * for each packet will be placed into the out_requests array, up to
  24. * num_out_requests packets. The number of packets sent will be
  25. * returned from the function.
  26. */
  27. BOOST_MPI_DECL request
  28. packed_archive_isend(communicator const& comm, int dest, int tag,
  29. const packed_oarchive& ar);
  30. /**
  31. * \overload
  32. */
  33. BOOST_MPI_DECL request
  34. packed_archive_isend(communicator const& comm, int dest, int tag,
  35. const packed_iarchive& ar);
  36. /** Receives a packed archive using MPI_Recv. */
  37. BOOST_MPI_DECL void
  38. packed_archive_recv(communicator const& comm, int source, int tag, packed_iarchive& ar,
  39. MPI_Status& status);
  40. } } } // end namespace boost::mpi::detail
  41. #endif // BOOST_MPI_DETAIL_POINT_TO_POINT_HPP