1 // Copyright (C) 2005, 2006 Douglas Gregor <doug.gregor -at- gmail.com>.
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)
7 // Allows broadcast of skeletons via proxy.
9 // This header may only be included after both the broadcast.hpp and
10 // and skeleton_and_content.hpp headers have been included.
11 #ifndef BOOST_MPI_BROADCAST_SC_HPP
12 #define BOOST_MPI_BROADCAST_SC_HPP
14 namespace boost
{ namespace mpi
{
18 broadcast(const communicator
& comm
, skeleton_proxy
<T
>& proxy
, int root
)
20 const skeleton_proxy
<T
>& const_proxy(proxy
);
21 broadcast(comm
, const_proxy
, root
);
26 broadcast(const communicator
& comm
, const skeleton_proxy
<T
>& proxy
, int root
)
28 if (comm
.rank() == root
) {
29 packed_skeleton_oarchive
oa(comm
);
31 broadcast(comm
, oa
, root
);
33 packed_skeleton_iarchive
ia(comm
);
34 broadcast(comm
, ia
, root
);
39 } } // end namespace boost::mpi
41 #endif // BOOST_MPI_BROADCAST_SC_HPP