8 #ifndef VECTOR_TEST_UTIL_HPP_
9 #define VECTOR_TEST_UTIL_HPP_
12 #include "Point_test.hpp"
13 #include "Vector/map_vector.hpp"
19 #ifdef TEST_COVERAGE_MODE
20 #define FIRST_PUSH 1000
21 #define SECOND_PUSH 1000
23 #define FIRST_PUSH 1000000
24 #define SECOND_PUSH 1000000
29 std::vector<Point_orig<float>> allocate_stl()
31 std::vector<Point_orig<float>> v_stl_test;
41 for (
size_t i = 0 ; i < FIRST_PUSH ; i++)
49 po.t[0][0] = 10.0 + i;
50 po.t[0][1] = 13.0 + i;
52 po.t[1][0] = 19.0 + i;
53 po.t[1][1] = 23.0 + i;
57 po.t[2][2] = 11.0 + i;
61 v_stl_test.push_back(po);
72 for (
size_t i = 0 ; i < n ; i++)
107 for (
size_t i = 0 ; i < n ; i++)
130 for (
size_t i = 0 ; i < n_ele / 2 ; i++)
135 p.get<P::v>()[0] = 1.0 + i;
136 p.get<P::v>()[1] = 2.0 + i;
137 p.get<P::v>()[2] = 7.0 + i;
139 p.get<P::t>()[0][0] = 10.0 + i;
140 p.get<P::t>()[0][1] = 13.0 + i;
141 p.get<P::t>()[0][2] = 8.0 + i;
142 p.get<P::t>()[1][0] = 19.0 + i;
143 p.get<P::t>()[1][1] = 23.0 + i;
144 p.get<P::t>()[1][2] = 5.0 + i;
145 p.get<P::t>()[2][0] = 4.0 + i;
146 p.get<P::t>()[2][1] = 3.0 + i;
147 p.get<P::t>()[2][2] = 11.0 + i;
155 for (
size_t i = n_ele / 2 ; i < n_ele ; i++)
159 size_t last = v_ofp_test.size()-1;
163 v_ofp_test.get<P::v>(last)[0] = 1.0 + i;
164 v_ofp_test.get<P::v>(last)[1] = 2.0 + i;
165 v_ofp_test.get<P::v>(last)[2] = 7.0 + i;
167 v_ofp_test.get<P::t>(last)[0][0] = 10.0 + i;
168 v_ofp_test.get<P::t>(last)[0][1] = 13.0 + i;
169 v_ofp_test.get<P::t>(last)[0][2] = 8.0 + i;
170 v_ofp_test.get<P::t>(last)[1][0] = 19.0 + i;
171 v_ofp_test.get<P::t>(last)[1][1] = 23.0 + i;
172 v_ofp_test.get<P::t>(last)[1][2] = 5.0 + i;
173 v_ofp_test.get<P::t>(last)[2][0] = 4.0 + i;
174 v_ofp_test.get<P::t>(last)[2][1] = 3.0 + i;
175 v_ofp_test.get<P::t>(last)[2][2] = 11.0 + i;
Definition of a class Point in plain C++ and boost::vector for testing purpose.
Test structure used for several test.
Implementation of 1-D std::vector like structure.