File indexing completed on 2025-01-18 09:40:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_MPI_BROADCAST_SC_HPP
0012 #define BOOST_MPI_BROADCAST_SC_HPP
0013
0014 namespace boost { namespace mpi {
0015
0016 template<typename T>
0017 void
0018 broadcast(const communicator& comm, const skeleton_proxy<T>& proxy, int root)
0019 {
0020 if (comm.rank() == root) {
0021 packed_skeleton_oarchive oa(comm);
0022 oa << proxy.object;
0023 broadcast(comm, oa, root);
0024 } else {
0025 packed_skeleton_iarchive ia(comm);
0026 broadcast(comm, ia, root);
0027 ia >> proxy.object;
0028 }
0029 }
0030
0031 template<typename T>
0032 inline void
0033 broadcast(const communicator& comm, skeleton_proxy<T>& proxy, int root)
0034 {
0035 const skeleton_proxy<T>& const_proxy(proxy);
0036 broadcast(comm, const_proxy, root);
0037 }
0038
0039
0040 } }
0041
0042 #endif