• Home
  • Raw
  • Download

Lines Matching +full:boost +full:- +full:root

3 // Use, modification and distribution is subject to the Boost Software
5 // http://www.boost.org/LICENSE_1_0.txt)
8 #include <boost/mpi/collectives/broadcast.hpp>
9 #include <boost/mpi/communicator.hpp>
10 #include <boost/mpi/environment.hpp>
13 #include <boost/serialization/string.hpp>
14 #include <boost/serialization/list.hpp>
15 #include <boost/mpi/skeleton_and_content.hpp>
16 #include <boost/iterator/counting_iterator.hpp>
20 #include <boost/test/included/unit_test.hpp>
22 using boost::mpi::communicator;
24 using boost::mpi::packed_skeleton_iarchive;
25 using boost::mpi::packed_skeleton_oarchive;
30 const char* kind, int root = -1) in broadcast_test() argument
32 if (root == -1) { in broadcast_test()
33 for (root = 0; root < comm.size(); ++root) in broadcast_test()
34 broadcast_test(comm, bc_value, kind, root); in broadcast_test()
36 using boost::mpi::broadcast; in broadcast_test()
39 if (comm.rank() == root) { in broadcast_test()
41 std::cout << "Broadcasting " << kind << " from root " << root << "..."; in broadcast_test()
45 broadcast(comm, value, root); in broadcast_test()
47 if (comm.rank() == root && value == bc_value) in broadcast_test()
55 test_skeleton_and_content(const communicator& comm, int root = 0) in test_skeleton_and_content() argument
57 using boost::mpi::content; in test_skeleton_and_content()
58 using boost::mpi::get_content; in test_skeleton_and_content()
59 using boost::make_counting_iterator; in test_skeleton_and_content()
60 using boost::mpi::broadcast; in test_skeleton_and_content()
63 if (comm.rank() == root) { in test_skeleton_and_content()
74 std::cout << "Broadcasting integer list skeleton from root " << root in test_skeleton_and_content()
76 broadcast(comm, oa, root); in test_skeleton_and_content()
80 std::cout << "Broadcasting integer list content from root " << root in test_skeleton_and_content()
84 broadcast(comm, c, root); in test_skeleton_and_content()
90 std::cout << "Broadcasting reversed integer list content from root " in test_skeleton_and_content()
91 << root << "..." << std::flush; in test_skeleton_and_content()
94 broadcast(comm, c, root); in test_skeleton_and_content()
105 broadcast(comm, ia, root); in test_skeleton_and_content()
114 broadcast(comm, get_content(transferred_list), root); in test_skeleton_and_content()
121 broadcast(comm, get_content(transferred_list), root); in test_skeleton_and_content()
130 << "in boost/mpi/config.hpp.\n\n"; in test_skeleton_and_content()
140 boost::mpi::environment env; in BOOST_AUTO_TEST_CASE()