1#ifndef VECTOR_UNIT_TESTS_HPP
2#define VECTOR_UNIT_TESTS_HPP
4#include "map_vector.hpp"
5#include "Point_test.hpp"
6#include "memory/ExtPreAlloc.hpp"
7#include "memory/PtrMemory.hpp"
9#include "Space/Shape/Point.hpp"
10#include "util/object_util.hpp"
11#include "vector_test_util.hpp"
13BOOST_AUTO_TEST_SUITE( vector_test )
15#define V_REM_PUSH 1024ul
17template <
typename vector>
void test_iterator()
21 vector v_ofp_test = allocate_openfpm<vector>(FIRST_PUSH);
25 auto it = v_ofp_test.getIterator();
34 BOOST_REQUIRE_EQUAL(count,v_ofp_test.size());
37 auto it_f = v_ofp_test.getIteratorFrom( FIRST_PUSH / 2 );
46 BOOST_REQUIRE_EQUAL(count, v_ofp_test.size() / 2 );
49template <
typename vector>
void test_vector_use()
51 std::vector<Point_orig<float>> v_stl_test = allocate_stl();
52 vector v_ofp_test = allocate_openfpm<vector>(FIRST_PUSH);
55 vector dv_ofp_test = v_ofp_test.duplicate();
59 for (
size_t i = 0; i < FIRST_PUSH; i++)
61 BOOST_REQUIRE_EQUAL(v_stl_test[i].v[0],v_ofp_test.template get<P::v>(i)[0]);
62 BOOST_REQUIRE_EQUAL(v_stl_test[i].v[1],v_ofp_test.template get<P::v>(i)[1]);
63 BOOST_REQUIRE_EQUAL(v_stl_test[i].v[2],v_ofp_test.template get<P::v>(i)[2]);
65 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[0][0],v_ofp_test.template get<P::t>(i)[0][0]);
66 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[0][1],v_ofp_test.template get<P::t>(i)[0][1]);
67 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[0][2],v_ofp_test.template get<P::t>(i)[0][2]);
68 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[1][0],v_ofp_test.template get<P::t>(i)[1][0]);
69 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[1][1],v_ofp_test.template get<P::t>(i)[1][1]);
70 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[1][2],v_ofp_test.template get<P::t>(i)[1][2]);
71 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[2][0],v_ofp_test.template get<P::t>(i)[2][0]);
72 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[2][1],v_ofp_test.template get<P::t>(i)[2][1]);
73 BOOST_REQUIRE_EQUAL(v_stl_test[i].t[2][2],v_ofp_test.template get<P::t>(i)[2][2]);
78 for (
size_t i = 0 ; i < FIRST_PUSH ; i++)
80 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::v>(i)[0],v_ofp_test.template get<P::v>(i)[0]);
81 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::v>(i)[1],v_ofp_test.template get<P::v>(i)[1]);
82 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::v>(i)[2],v_ofp_test.template get<P::v>(i)[2]);
84 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[0][0],v_ofp_test.template get<P::t>(i)[0][0]);
85 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[0][1],v_ofp_test.template get<P::t>(i)[0][1]);
86 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[0][2],v_ofp_test.template get<P::t>(i)[0][2]);
87 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[1][0],v_ofp_test.template get<P::t>(i)[1][0]);
88 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[1][1],v_ofp_test.template get<P::t>(i)[1][1]);
89 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[1][2],v_ofp_test.template get<P::t>(i)[1][2]);
90 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[2][0],v_ofp_test.template get<P::t>(i)[2][0]);
91 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[2][1],v_ofp_test.template get<P::t>(i)[2][1]);
92 BOOST_REQUIRE_EQUAL(dv_ofp_test.template get<P::t>(i)[2][2],v_ofp_test.template get<P::t>(i)[2][2]);
96template <
typename vector>
void test_vector_remove()
104 for (
size_t i = 0 ; i < V_REM_PUSH ; i++)
125 BOOST_REQUIRE_EQUAL(v1.size(),1020ul);
126 BOOST_REQUIRE_EQUAL(v1.template get<p::x>(0),4);
130 rem.add(v1.size()-3);
131 rem.add(v1.size()-2);
132 rem.add(v1.size()-1);
138 BOOST_REQUIRE_EQUAL(v1.size(),1016ul);
139 BOOST_REQUIRE_EQUAL(v1.template get<p::x>(v1.size()-1),1019);
143 for (
size_t i = 0 ; i < (V_REM_PUSH - 8) / 2 ; i++)
150 BOOST_REQUIRE_EQUAL(v1.size(),508ul);
153 for (
size_t i = 0 ; i < v1.size() ; i++)
155 BOOST_REQUIRE_EQUAL((
size_t)v1.template get<p::x>(v1.size()-1) % 2, 1ul);
160template <
typename vector>
void test_vector_remove_aggregate()
168 for (
size_t i = 0 ; i < V_REM_PUSH ; i++)
180 rem.last().get<0>() = 0;
182 rem.last().get<0>() = 1;
184 rem.last().get<0>() = 2;
186 rem.last().get<0>() = 3;
193 BOOST_REQUIRE_EQUAL(v1.size(),1020ul);
194 BOOST_REQUIRE_EQUAL(v1.template get<p::x>(0),4);
199 rem.last().get<0>() = v1.
size()-3;
201 rem.last().get<0>() = v1.
size()-2;
203 rem.last().get<0>() = v1.
size()-1;
205 rem.last().get<0>() = v1.
size();
210 BOOST_REQUIRE_EQUAL(v1.size(),1016ul);
211 BOOST_REQUIRE_EQUAL(v1.template get<p::x>(v1.size()-1),1019);
215 for (
size_t i = 0 ; i < (V_REM_PUSH - 8) / 2 ; i++)
218 rem.last().get<0>() = i * 2;
224 BOOST_REQUIRE_EQUAL(v1.size(),508ul);
227 for (
size_t i = 0 ; i < v1.size() ; i++)
229 BOOST_REQUIRE_EQUAL((
size_t)v1.template get<p::x>(v1.size()-1) % 2, 1ul);
233template <
typename vector>
void test_vector_insert()
239 for (
size_t i = 0 ; i < V_REM_PUSH ; i++)
248 BOOST_REQUIRE_EQUAL(v1.size(),V_REM_PUSH);
253 v1.template get<p::x>(0) = -9999.0;
257 v1.insert(V_REM_PUSH / 2);
258 v1.template get<p::x>(V_REM_PUSH / 2) = -9999.0;
262 v1.insert(v1.size()-1);
263 v1.template get<p::x>(v1.size()-1) = -9999.0;
265 BOOST_REQUIRE_EQUAL(v1.size(),V_REM_PUSH + 3);
267 BOOST_REQUIRE_EQUAL(v1.template get<p::x>(0), -9999.0);
268 BOOST_REQUIRE_EQUAL(v1.template get<p::x>(V_REM_PUSH / 2), -9999.0);
269 BOOST_REQUIRE_EQUAL(v1.template get<p::x>(v1.size()-1), -9999.0);
274 for (
size_t i = 0 ; i < v1.size() ; i++)
276 if (i == 0 || i == V_REM_PUSH / 2 || i == v1.size()-1)
279 BOOST_REQUIRE_EQUAL((
size_t)v1.template get<p::x>(i), c);
285template <
typename vector>
void test_vector_clear()
289 for (
size_t i = 0 ; i < V_REM_PUSH ; i++)
300 BOOST_REQUIRE_EQUAL(v1.size(),0ul);
302 for (
size_t i = 0 ; i < V_REM_PUSH ; i++)
311 BOOST_REQUIRE_EQUAL(v1.size(),V_REM_PUSH);
314template <
typename vector,
template <
typename>
class layout_base>
void test_vector_add_test_case()
328 for (
size_t i = 0 ; i < FIRST_PUSH ; i++)
336 p.
get<
P::t>()[0][0] = 10.0 + i;
337 p.
get<
P::t>()[0][1] = 13.0 + i;
339 p.
get<
P::t>()[1][0] = 19.0 + i;
340 p.
get<
P::t>()[1][1] = 23.0 + i;
344 p.
get<
P::t>()[2][2] = 11.0 + i;
352 vector v2 = v1.duplicate();
354 v1.template add_prp<Point_test<float>,
HeapMemory,
typename openfpm::grow_policy_double,OPENFPM_NATIVE,layout_base,
P::x,
P::y,
P::z,
P::s,
P::v,
P::t>(v2);
356 for (
size_t i = 0 ; i < FIRST_PUSH ; i++)
358 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[0], v1.template get<P::v>(i+v2.size())[0]);
359 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[1], v1.template get<P::v>(i+v2.size())[1]);
360 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[2], v1.template get<P::v>(i+v2.size())[2]);
362 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][0], v1.template get<P::t>(i+v2.size())[0][0]);
363 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][1], v1.template get<P::t>(i+v2.size())[0][1]);
364 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][2], v1.template get<P::t>(i+v2.size())[0][2]);
365 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][0], v1.template get<P::t>(i+v2.size())[1][0]);
366 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][1], v1.template get<P::t>(i+v2.size())[1][1]);
367 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][2], v1.template get<P::t>(i+v2.size())[1][2]);
368 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][0], v1.template get<P::t>(i+v2.size())[2][0]);
369 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][1], v1.template get<P::t>(i+v2.size())[2][1]);
370 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][2], v1.template get<P::t>(i+v2.size())[2][2]);
377 for (
size_t i = 0 ; i < FIRST_PUSH ; i++)
379 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[0], v1.template get<P::v>(i+2*v2.size())[0]);
380 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[1], v1.template get<P::v>(i+2*v2.size())[1]);
381 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[2], v1.template get<P::v>(i+2*v2.size())[2]);
383 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][0], v1.template get<P::t>(i+2*v2.size())[0][0]);
384 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][1], v1.template get<P::t>(i+2*v2.size())[0][1]);
385 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][2], v1.template get<P::t>(i+2*v2.size())[0][2]);
386 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][0], v1.template get<P::t>(i+2*v2.size())[1][0]);
387 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][1], v1.template get<P::t>(i+2*v2.size())[1][1]);
388 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][2], v1.template get<P::t>(i+2*v2.size())[1][2]);
389 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][0], v1.template get<P::t>(i+2*v2.size())[2][0]);
390 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][1], v1.template get<P::t>(i+2*v2.size())[2][1]);
391 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][2], v1.template get<P::t>(i+2*v2.size())[2][2]);
395template <
typename vector>
void test_vector_copy_and_compare()
412 v1.last().add(133.0);
413 v1.last().add(221.0);
419 bool ret = (v2 == v1);
420 BOOST_REQUIRE_EQUAL(ret,
true);
422 v1.get(2).get(1) = 222.0;
425 BOOST_REQUIRE_EQUAL(ret,
false);
452 bool ret = (v2 == v1);
453 BOOST_REQUIRE_EQUAL(ret,
true);
455 v1.get(2).get(1).template get<Box<3,float>::p1>()[0] = 222.0;
458 BOOST_REQUIRE_EQUAL(ret,
false);
462template <
typename vector>
void test_vector_load_and_save_check()
466 for (
size_t i = 0; i < 5; i++)
469 for (
size_t j = 0; j < 6; j++)
475 v1.save(
"test_save");
477 v2.load(
"test_save");
481 BOOST_REQUIRE_EQUAL(v1.
size(),v2.
size());
482 for (
size_t i = 0; i < v1.
size(); i++)
484 BOOST_REQUIRE_EQUAL(v1.get(i).
size(),v2.get(i).
size());
485 for (
size_t j = 0; j < 6; j++)
487 BOOST_REQUIRE_EQUAL(v1.get(i).get(j),v2.get(i).get(j));
494BOOST_AUTO_TEST_CASE (vector_iterator_test)
496 test_iterator< openfpm::vector<Point_test<float>> >();
502BOOST_AUTO_TEST_CASE( vector_use)
504 std::cout <<
"Vector unit test start" <<
"\n";
506 test_vector_use<openfpm::vector<Point_test<float>>>();
509 std::cout <<
"Vector unit test end" <<
"\n";
513size_t alloc[] = {235,345,0,520};
514size_t n_alloc =
sizeof(alloc)/
sizeof(
size_t);
517BOOST_AUTO_TEST_CASE(vector_remove )
519 test_vector_remove<openfpm::vector<Point_test<float>>>();
523BOOST_AUTO_TEST_CASE(vector_remove_aggregate )
525 test_vector_remove_aggregate<openfpm::vector<Point_test<float>>>();
529BOOST_AUTO_TEST_CASE(vector_insert )
531 test_vector_insert<openfpm::vector<Point_test<float>>>();
535BOOST_AUTO_TEST_CASE(vector_clear )
537 test_vector_clear< openfpm::vector<Point_test<float>> >();
541BOOST_AUTO_TEST_CASE( vector_add_test_case )
543 test_vector_add_test_case<openfpm::vector<Point_test<float>>,
memory_traits_lin>();
547BOOST_AUTO_TEST_CASE( vector_copy_and_compare )
549 test_vector_copy_and_compare< openfpm::vector<Point_test<float>> >();
553BOOST_AUTO_TEST_CASE( vector_load_and_save_check )
555 test_vector_load_and_save_check< openfpm::vector<Point_test<float>> >();
562BOOST_AUTO_TEST_CASE( vector_safety_check )
564#if defined(SE_CLASS1) && defined (THROW_ON_ERROR)
577 {v.template get<p::x>(23);}
578 catch (std::exception & e)
581 BOOST_REQUIRE_EQUAL(e.what(),
"Runtime vector error");
583 BOOST_REQUIRE_EQUAL(error,
true);
589 catch (std::exception & e)
592 BOOST_REQUIRE_EQUAL(e.what(),
"Runtime vector error");
594 BOOST_REQUIRE_EQUAL(error,
true);
599 catch (std::exception & e)
602 BOOST_REQUIRE_EQUAL(e.what(),
"Runtime grid error");
604 BOOST_REQUIRE_EQUAL(error,
true);
610 {v.template get<p::x>(-1);}
611 catch (std::exception & e)
614 BOOST_REQUIRE_EQUAL(e.what(),
"Runtime vector error");
616 BOOST_REQUIRE_EQUAL(error,
true);
622 catch (std::exception & e)
625 BOOST_REQUIRE_EQUAL(e.what(),
"Runtime vector error");
627 BOOST_REQUIRE_EQUAL(error,
true);
632 catch (std::exception & e)
635 BOOST_REQUIRE_EQUAL(e.what(),
"Runtime grid error");
637 BOOST_REQUIRE_EQUAL(error,
true);
642BOOST_AUTO_TEST_CASE( object_test_creator )
644 bool tst = std::is_same< typename object_creator<Point_test<float>::type,0,1,5>::type,
typename boost::fusion::vector3<float,float,float[3][3]> >::value;
646 BOOST_REQUIRE_EQUAL(tst ,
true);
649BOOST_AUTO_TEST_CASE( vector_memory_repr )
663 for (
size_t i = 0 ; i < FIRST_PUSH ; i++)
671 p.
get<
P::t>()[0][0] = 10.0 + i;
672 p.
get<
P::t>()[0][1] = 13.0 + i;
674 p.
get<
P::t>()[1][0] = 19.0 + i;
675 p.
get<
P::t>()[1][1] = 23.0 + i;
679 p.
get<
P::t>()[2][2] = 11.0 + i;
694 v2.resize(FIRST_PUSH);
700 for (
size_t i = 0 ; i < FIRST_PUSH ; i++)
702 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[0],v2.template get<P::v>(i)[0]);
703 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[1],v2.template get<P::v>(i)[1]);
704 BOOST_REQUIRE_EQUAL(v1.template get<P::v>(i)[2],v2.template get<P::v>(i)[2]);
706 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][0],v2.template get<P::t>(i)[0][0]);
707 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][1],v2.template get<P::t>(i)[0][1]);
708 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[0][2],v2.template get<P::t>(i)[0][2]);
709 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][0],v2.template get<P::t>(i)[1][0]);
710 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][1],v2.template get<P::t>(i)[1][1]);
711 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[1][2],v2.template get<P::t>(i)[1][2]);
712 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][0],v2.template get<P::t>(i)[2][0]);
713 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][1],v2.template get<P::t>(i)[2][1]);
714 BOOST_REQUIRE_EQUAL(v1.template get<P::t>(i)[2][2],v2.template get<P::t>(i)[2][2]);
718BOOST_AUTO_TEST_CASE( vector_std_utility )
731 for (
size_t i = 0 ; i < 16 ; i++)
741 for (
size_t i = 0 ; i < 16 ; i++)
743 BOOST_REQUIRE_EQUAL(pb.get(i),0ul);
748BOOST_AUTO_TEST_CASE ( vector_prealloc_ext )
754 std::vector<size_t> pap;
761 for (
size_t i = 0 ; i < n_alloc ; i++)
763 size_t alloc_ele = vect.calculateMem(alloc[i],0);
764 pap.push_back(alloc_ele);
777 g_send.resize(n_alloc);
780 for (
size_t i = 0 ; i < n_alloc ; i++)
783 g_send.get(i).setMemory(*prAlloc);
786 g_send.get(i).resize(alloc[i]);
790 for (
size_t i = 0 ; i < n_alloc ; i++)
792 auto it = g_send.get(i).getIterator();
793 auto & v = g_send.get(i);
799 v.template get<P::x>(kk) = 1.0f;
800 v.template get<P::y>(kk) = 1.0f;
801 v.template get<P::z>(kk) = 1.0f;
802 v.template get<P::s>(kk) = 1.0f;
804 v.template get<P::v>(kk)[0] = 1.0f;
805 v.template get<P::v>(kk)[1] = 1.0f;
806 v.template get<P::v>(kk)[2] = 1.0f;
808 v.template get<P::t>(kk)[0][0] = 1.0f;
809 v.template get<P::t>(kk)[0][1] = 1.0f;
810 v.template get<P::t>(kk)[0][2] = 1.0f;
811 v.template get<P::t>(kk)[1][0] = 1.0f;
812 v.template get<P::t>(kk)[1][1] = 1.0f;
813 v.template get<P::t>(kk)[1][2] = 1.0f;
814 v.template get<P::t>(kk)[2][0] = 1.0f;
815 v.template get<P::t>(kk)[2][1] = 1.0f;
816 v.template get<P::t>(kk)[2][2] = 1.0f;
830 for (
size_t i = 0 ; i < n_alloc ; i++)
832 for (
size_t j = 0 ; j < alloc[i] ; j++)
833 BOOST_REQUIRE_EQUAL(ptr[j + offset/
sizeof(
float)],1.0f);
845BOOST_AUTO_TEST_CASE ( test_gpu_iterator )
852 auto ite = pl.getGPUIterator();
854 BOOST_REQUIRE_EQUAL(ite.wthr.x,1ul);
855 BOOST_REQUIRE_EQUAL(ite.wthr.x,1ul);
856 BOOST_REQUIRE_EQUAL(ite.wthr.x,1ul);
858 BOOST_REQUIRE_EQUAL(ite.thr.x,10ul);
859 BOOST_REQUIRE_EQUAL(ite.thr.y,1ul);
860 BOOST_REQUIRE_EQUAL(ite.thr.z,1ul);
866 auto ite = pl.getGPUIterator(32);
868 BOOST_REQUIRE_EQUAL(ite.wthr.x,2ul);
869 BOOST_REQUIRE_EQUAL(ite.wthr.y,1ul);
870 BOOST_REQUIRE_EQUAL(ite.wthr.z,1ul);
872 BOOST_REQUIRE_EQUAL(ite.thr.x,32ul);
873 BOOST_REQUIRE_EQUAL(ite.thr.y,1ul);
874 BOOST_REQUIRE_EQUAL(ite.thr.z,1ul);
880BOOST_AUTO_TEST_CASE( vector_cuda_to_kernel_recursive )
894 bool test = std::is_same<tker1,openfpm::vector_gpu_ker<aggregate<int, long>,
memory_traits_inte>>::value;
896 BOOST_REQUIRE_EQUAL(test,
true);
900 BOOST_REQUIRE_EQUAL(test,
true);
904 BOOST_REQUIRE_EQUAL(test,
true);
906 test = std::is_same<tker4,openfpm::vector_gpu_ker<Box<3,float>,
memory_traits_inte>>::value;
908 BOOST_REQUIRE_EQUAL(test,
true);
912 BOOST_REQUIRE_EQUAL(test,
true);
915BOOST_AUTO_TEST_SUITE_END()
This class represent an N-dimensional box.
This class allocate, and destroy CPU memory.
virtual void * getPointer()
get a readable pointer with the data
Test structure used for several test.
static const unsigned int x
x property is at position 0 in the boost::fusion::vector
void sety(T y_)
set the y property
static const unsigned int s
s property is at position 3 in the boost::fusion::vector
void setz(T z_)
set the z property
auto get() -> decltype(boost::fusion::at_c< i >(data))
getter method for a general property i
static const unsigned int v
v property is at position 4 in the boost::fusion::vector
void sets(T s_)
set the s property
static const unsigned int y
y property is at position 1 in the boost::fusion::vector
static const unsigned int z
z property is at position 2 in the boost::fusion::vector
void setx(T x_)
set the x property
static const unsigned int t
t property is at position 5 in the boost::fusion::vector
This class give memory from a preallocated memory, memory destruction is not performed.
Grow policy define how the vector should grow every time we exceed the size.
Grow policy define how the vector should grow every time we exceed the size.
Implementation of 1-D std::vector like structure.
Transform the boost::fusion::vector into memory specification (memory_traits)
Transform the boost::fusion::vector into memory specification (memory_traits)
It model an expression expr1 * expr2.