File indexing completed on 2025-01-18 09:40:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_MPI_COMMUNICATOR_SC_HPP
0012 #define BOOST_MPI_COMMUNICATOR_SC_HPP
0013
0014 namespace boost { namespace mpi {
0015
0016 template<typename T>
0017 void
0018 communicator::send(int dest, int tag, const skeleton_proxy<T>& proxy) const
0019 {
0020 packed_skeleton_oarchive ar(*this);
0021 ar << proxy.object;
0022 send(dest, tag, ar);
0023 }
0024
0025 template<typename T>
0026 status
0027 communicator::recv(int source, int tag, const skeleton_proxy<T>& proxy) const
0028 {
0029 packed_skeleton_iarchive ar(*this);
0030 status result = recv(source, tag, ar);
0031 ar >> proxy.object;
0032 return result;
0033 }
0034
0035 template<typename T>
0036 status communicator::recv(int source, int tag, skeleton_proxy<T>& proxy) const
0037 {
0038 packed_skeleton_iarchive ar(*this);
0039 status result = recv(source, tag, ar);
0040 ar >> proxy.object;
0041 return result;
0042 }
0043
0044 template<typename T>
0045 request
0046 communicator::isend(int dest, int tag, const skeleton_proxy<T>& proxy) const
0047 {
0048 shared_ptr<packed_skeleton_oarchive>
0049 archive(new packed_skeleton_oarchive(*this));
0050
0051 *archive << proxy.object;
0052 request result = isend(dest, tag, *archive);
0053 result.preserve(archive);
0054 return result;
0055 }
0056
0057 } }
0058
0059 #endif
0060