2#define BOOST_TEST_DYN_LINK
3#include <boost/test/unit_test.hpp>
5#include "VCluster/VCluster.hpp"
6#include "Vector/vector_dist.hpp"
7#include "Operators/Vector/vector_dist_operators.hpp"
8#include "Operators/Vector/tests/vector_dist_operators_tests_util.hpp"
11BOOST_AUTO_TEST_SUITE( vector_dist_operators_test_gpu )
13BOOST_AUTO_TEST_CASE(vector_dist_operators_list_ker_test)
15 if (create_vcluster().getProcessingUnits() > 3)
21 size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
26 vector_dist_gpu<3,float,aggregate<float,float,float,VectorS<3,float>,
VectorS<3,float>,
VectorS<3,float>>> vd(127*create_vcluster().size(),box,bc,ghost);
28 typedef decltype(vd.toKernel()) vector_dist_kernel;
32 BOOST_REQUIRE_EQUAL(vdkl.n_entry(),0);
35 auto vA = getV<A,comp_dev>(vd);
37 BOOST_REQUIRE_EQUAL(vdkl.n_entry(),1);
40 auto vB = getV<B,comp_dev>(vd);
41 auto vC = getV<C,comp_dev>(vd);
43 auto vVA = getV<VA,comp_dev>(vd);
44 auto vVB = getV<VB,comp_dev>(vd);
45 auto vVC = getV<VC,comp_dev>(vd);
47 BOOST_REQUIRE_EQUAL(vdkl.n_entry(),6);
50 fill_values<comp_dev>(vd);
52 vd.map(RUN_ON_DEVICE);
55 BOOST_REQUIRE_EQUAL(vdkl.check(vd.toKernel()),
true);
57 vd.template ghost_get<0,1,2,3,4,5>(RUN_ON_DEVICE);
60 BOOST_REQUIRE_EQUAL(vdkl.check(vd.toKernel()),
true);
63 BOOST_REQUIRE_EQUAL(vdkl.n_entry(),1);
66 BOOST_REQUIRE_EQUAL(vdkl.n_entry(),0);
69BOOST_AUTO_TEST_CASE( vector_dist_operators_gpu_test )
71 if (create_vcluster().getProcessingUnits() > 3)
77 size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
83 typedef vector_dist_gpu<3,float,aggregate<float,float,float,VectorS<3,float>,
VectorS<3,float>,
VectorS<3,float>>> vtype;
85 vector_dist_gpu<3,float,aggregate<float,float,float,VectorS<3,float>,
VectorS<3,float>,
VectorS<3,float>>> vd(100,box,bc,ghost);
91BOOST_AUTO_TEST_SUITE_END()
This class represent an N-dimensional box.
This class implement the point shape in an N-dimensional space.
This class contain a list of all tracked vector_dist_ker around.