8 #ifndef VCLUSTER_UNIT_TESTS_HPP_ 
    9 #define VCLUSTER_UNIT_TESTS_HPP_ 
   12 #include <boost/test/included/unit_test.hpp> 
   15 #include "VCluster_unit_test_util.hpp" 
   16 #include "Point_test.hpp" 
   17 #include "VCluster_base.hpp" 
   18 #include "Vector/vector_test_util.hpp" 
   20 BOOST_AUTO_TEST_SUITE( VCluster_test )
 
   22 BOOST_AUTO_TEST_CASE (Vcluster_robustness)
 
   29 BOOST_AUTO_TEST_CASE( VCluster_use_reductions)
 
   39     unsigned short us = 1;
 
   43     unsigned long int uli = 1;
 
  116 #define N_V_ELEMENTS 16 
  118 BOOST_AUTO_TEST_CASE(VCluster_send_recv)
 
  122     test_send_recv_complex(N_V_ELEMENTS,vcl);
 
  123     test_send_recv_primitives<unsigned char>(N_V_ELEMENTS,vcl);
 
  124     test_send_recv_primitives<char>(N_V_ELEMENTS,vcl);
 
  125     test_send_recv_primitives<short>(N_V_ELEMENTS,vcl);
 
  126     test_send_recv_primitives<unsigned short>(N_V_ELEMENTS,vcl);
 
  127     test_send_recv_primitives<int>(N_V_ELEMENTS,vcl);
 
  128     test_send_recv_primitives<unsigned int>(N_V_ELEMENTS,vcl);
 
  129     test_send_recv_primitives<long int>(N_V_ELEMENTS,vcl);
 
  130     test_send_recv_primitives<unsigned long int>(N_V_ELEMENTS,vcl);
 
  131     test_send_recv_primitives<float>(N_V_ELEMENTS,vcl);
 
  132     test_send_recv_primitives<double>(N_V_ELEMENTS,vcl);
 
  135 BOOST_AUTO_TEST_CASE(VCluster_allgather)
 
  140         test_single_all_gather_primitives<unsigned char>(vcl);
 
  143         test_single_all_gather_primitives<char>(vcl);
 
  145     test_single_all_gather_primitives<short>(vcl);
 
  146     test_single_all_gather_primitives<unsigned short>(vcl);
 
  147     test_single_all_gather_primitives<int>(vcl);
 
  148     test_single_all_gather_primitives<unsigned int>(vcl);
 
  149     test_single_all_gather_primitives<long int>(vcl);
 
  150     test_single_all_gather_primitives<unsigned long int>(vcl);
 
  151     test_single_all_gather_primitives<float>(vcl);
 
  152     test_single_all_gather_primitives<double>(vcl);
 
  161 BOOST_AUTO_TEST_CASE(VCluster_bcast_test)
 
  165     std::cout << 
"Broadcast test " << std::endl;
 
  167     test_single_all_broadcast_primitives<unsigned char>(vcl);
 
  168     test_single_all_broadcast_primitives<char>(vcl);
 
  169     test_single_all_broadcast_primitives<short>(vcl);
 
  170     test_single_all_broadcast_primitives<unsigned short>(vcl);
 
  171     test_single_all_broadcast_primitives<int>(vcl);
 
  172     test_single_all_broadcast_primitives<unsigned int>(vcl);
 
  173     test_single_all_broadcast_primitives<long int>(vcl);
 
  174     test_single_all_broadcast_primitives<unsigned long int>(vcl);
 
  175     test_single_all_broadcast_primitives<float>(vcl);
 
  176     test_single_all_broadcast_primitives<double>(vcl);
 
  179 BOOST_AUTO_TEST_CASE( VCluster_use_sendrecv)
 
  181     std::cout << 
"VCluster unit test start sendrecv" << 
"\n";
 
  184     test<NBX>(RECEIVE_UNKNOWN);
 
  187     test_no_send_some_peer<NBX>();
 
  189     std::cout << 
"VCluster unit test stop sendrecv" << 
"\n";
 
  192 BOOST_AUTO_TEST_CASE( VCluster_use_sendrecv_size_known)
 
  194     std::cout << 
"VCluster unit test start sendrecv known size" << 
"\n";
 
  197     test<NBX>(RECEIVE_SIZE_UNKNOWN);
 
  200     test_no_send_some_peer<NBX>();
 
  202     std::cout << 
"VCluster unit test stop sendrecv known size" << 
"\n";
 
  205 BOOST_AUTO_TEST_CASE( VCluster_use_sendrecv_known)
 
  207     std::cout << 
"VCluster unit test start known" << 
"\n";
 
  211     std::cout << 
"VCluster unit test stop known" << 
"\n";
 
  216 BOOST_AUTO_TEST_SUITE_END()
 
void sum(T &num)
Sum the numbers across all processors and get the result. 
 
size_t getProcessUnitID()
Get the process unit id. 
 
void execute()
Execute all the requests. 
 
void max(T &num)
Get the maximum number across all processors (or reduction with infinity norm) 
 
Implementation of VCluster class. 
 
size_t getProcessingUnits()
Get the total number of processors.