2#define BOOST_TEST_DYN_LINK
3#include <boost/test/unit_test.hpp>
9BOOST_AUTO_TEST_SUITE( vd_hdf5_chckpnt_rstrt_test_gpu )
14BOOST_AUTO_TEST_CASE( vector_dist_hdf5_save_test_gpu )
21 for (
size_t i = 0 ; i < 1024 ; i++)
33 vprp.template get<0>(vprp.
size()-1) = p.
get(0) + 113.0;
35 vprp.template get<1>(vprp.
size()-1)[0] = p.
get(0) + 100.0;
36 vprp.template get<1>(vprp.
size()-1)[1] = p.
get(1) + 200.0;
37 vprp.template get<1>(vprp.
size()-1)[2] = p.
get(2) + 300.0;
39 vprp.template get<2>(vprp.
size()-1) = p.
get(0) + 10013.0;
41 vprp.template get<3>(vprp.
size()-1)[0][0] = p.
get(0) + 600.0;
42 vprp.template get<3>(vprp.
size()-1)[0][1] = p.
get(0) + 900.0;
43 vprp.template get<3>(vprp.
size()-1)[0][2] = p.
get(0) + 1600.0;
44 vprp.template get<3>(vprp.
size()-1)[1][0] = p.
get(0) + 5600.0;
45 vprp.template get<3>(vprp.
size()-1)[1][1] = p.
get(0) + 6900.0;
46 vprp.template get<3>(vprp.
size()-1)[1][2] = p.
get(0) + 7600.0;
47 vprp.template get<3>(vprp.
size()-1)[2][0] = p.
get(0) + 9600.0;
48 vprp.template get<3>(vprp.
size()-1)[2][1] = p.
get(0) + 1900.0;
49 vprp.template get<3>(vprp.
size()-1)[2][2] = p.
get(0) + 101600.0;
55 h5.save(
"vector_dist.h5",vpos,vprp);
63 h5r.load(
"vector_dist.h5",vpos2,vprp2,g_m);
65 BOOST_REQUIRE_EQUAL(1024ul,vpos2.
size());
66 BOOST_REQUIRE_EQUAL(1024ul,vprp2.
size());
68 BOOST_REQUIRE_EQUAL(1024ul,g_m);
73 for (
size_t i = 0 ; i < vpos.
size() ; i++)
80 check &= (vprp.template get<1>(i)[0] == vprp2.template get<1>(i)[0]);
81 check &= (vprp.template get<1>(i)[1] == vprp2.template get<1>(i)[1]);
82 check &= (vprp.template get<1>(i)[2] == vprp2.template get<1>(i)[2]);
84 check &= (vprp.template get<0>(i) == vprp2.template get<0>(i));
85 check &= (vprp.template get<2>(i) == vprp2.template get<2>(i));
87 check &= (vprp.template get<3>(i)[0][0] == vprp2.template get<3>(i)[0][0]);
88 check &= (vprp.template get<3>(i)[0][1] == vprp2.template get<3>(i)[0][1]);
89 check &= (vprp.template get<3>(i)[0][2] == vprp2.template get<3>(i)[0][2]);
90 check &= (vprp.template get<3>(i)[1][0] == vprp2.template get<3>(i)[1][0]);
91 check &= (vprp.template get<3>(i)[1][1] == vprp2.template get<3>(i)[1][1]);
92 check &= (vprp.template get<3>(i)[1][2] == vprp2.template get<3>(i)[1][2]);
93 check &= (vprp.template get<3>(i)[2][0] == vprp2.template get<3>(i)[2][0]);
94 check &= (vprp.template get<3>(i)[2][1] == vprp2.template get<3>(i)[2][1]);
95 check &= (vprp.template get<3>(i)[2][2] == vprp2.template get<3>(i)[2][2]);
98 BOOST_REQUIRE_EQUAL(check,
true);
101BOOST_AUTO_TEST_SUITE_END()
This class implement the point shape in an N-dimensional space.
__device__ __host__ const T & get(unsigned int i) const
Get coordinate.
Implementation of 1-D std::vector like structure.