4#include <boost/fusion/sequence/intrinsic/at_c.hpp>
5#include <boost/fusion/include/at_c.hpp>
6#include <boost/fusion/container/vector.hpp>
7#include <boost/fusion/include/vector.hpp>
8#include <boost/fusion/container/vector/vector_fwd.hpp>
9#include <boost/fusion/include/vector_fwd.hpp>
10#include "boost/multi_array.hpp"
11#include "Point_orig.hpp"
12#include "memory_ly/Encap.hpp"
13#include "data_type/aggregate.hpp"
40 typedef boost::fusion::vector<T,T,T,T,T[2],T[2][2]>
type;
43 typedef boost::fusion::vector<T,T,T,T,T[2],T[2][2]>
type_real;
46 static constexpr bool stag_mask[]={
false,
false,
false,
true,
true,
true};
52 static const unsigned int x = 0;
55 static const unsigned int y = 1;
58 static const unsigned int z = 2;
61 static const unsigned int s = 3;
64 static const unsigned int v = 4;
67 static const unsigned int t = 5;
112 typedef boost::fusion::vector<T,T,T,T,T[3],T[3][3],SE3_ADD_PROP(6)>
type;
115 typedef boost::fusion::vector<T,T,T,T,T[3],T[3][3]>
type_real;
120 typedef boost::fusion::vector<T,T,T,T,T[3],T[3][3]>
type;
123 typedef boost::fusion::vector<T,T,T,T,T[3],T[3][3]>
type_real;
128 static constexpr bool stag_mask[]={
false,
false,
false,
true,
true,
true};
134 static const unsigned int x = 0;
137 static const unsigned int y = 1;
140 static const unsigned int z = 2;
143 static const unsigned int s = 3;
146 static const unsigned int v = 4;
149 static const unsigned int t = 5;
154 static const unsigned int max_prop = SE3_MAX_PROP(6);
176 inline void setx(T x_) {boost::fusion::at_c<0>(
data) = x_;};
183 inline void sety(T y_) {boost::fusion::at_c<1>(
data) = y_;};
190 inline void setz(T z_) {boost::fusion::at_c<2>(
data) = z_;};
197 inline void sets(T s_) {boost::fusion::at_c<3>(
data) = s_;};
205 inline void setv(
size_t i,T v_) {boost::fusion::at_c<4>(
data)[i] = v_;}
214 inline void sett(
size_t i,
size_t j,T t_) {boost::fusion::at_c<5>(
data)[i][j] = t_;}
218 template<
unsigned int i>
219 inline auto get() ->
decltype(boost::fusion::at_c<i>(
data))
220 {
return boost::fusion::at_c<i>(
data);}
223 template<
unsigned int i>
224 inline auto get() const -> decltype(boost::fusion::at_c<i>(
data))
225 {
return boost::fusion::at_c<i>(
data);}
238 if (boost::fusion::at_c<0>(
data) != boost::fusion::at_c<0>(p.
data))
return false;
239 if (boost::fusion::at_c<1>(
data) != boost::fusion::at_c<1>(p.
data))
return false;
240 if (boost::fusion::at_c<2>(
data) != boost::fusion::at_c<2>(p.
data))
return false;
241 if (boost::fusion::at_c<3>(
data) != boost::fusion::at_c<3>(p.
data))
return false;
243 for (
size_t i = 0 ; i < 3 ; i++)
244 if (boost::fusion::at_c<4>(
data)[i] != boost::fusion::at_c<4>(p.
data)[i])
return false;
246 for (
size_t i = 0 ; i < 3 ; i++)
248 for (
size_t j = 0 ; j < 3 ; j++)
250 if (boost::fusion::at_c<5>(
data)[i][j] != boost::fusion::at_c<5>(p.
data)[i][j])
return false;
266 boost::fusion::at_c<0>(
data) += boost::fusion::at_c<0>(p.
data);
267 boost::fusion::at_c<1>(
data) += boost::fusion::at_c<1>(p.
data);
268 boost::fusion::at_c<2>(
data) += boost::fusion::at_c<2>(p.
data);
269 boost::fusion::at_c<3>(
data) += boost::fusion::at_c<3>(p.
data);
271 for (
size_t i = 0 ; i < 3 ; i++)
272 boost::fusion::at_c<4>(
data)[i] += boost::fusion::at_c<4>(p.
data)[i];
274 for (
size_t i = 0 ; i < 3 ; i++)
276 for (
size_t j = 0 ; j < 3 ; j++)
277 boost::fusion::at_c<5>(
data)[i][j] += boost::fusion::at_c<5>(p.
data)[i][j];
290 boost::fusion::at_c<0>(
data) = p.template get<0>();
291 boost::fusion::at_c<1>(
data) = p.template get<1>();
292 boost::fusion::at_c<2>(
data) = p.template get<2>();
293 boost::fusion::at_c<3>(
data) = p.template get<3>();
295 for (
size_t i = 0 ; i < 3 ; i++)
296 boost::fusion::at_c<4>(
data)[i] = p.template get<4>()[i];
298 for (
size_t i = 0 ; i < 3 ; i++)
300 for (
size_t j = 0 ; j < 3 ; j++)
302 boost::fusion::at_c<5>(
data)[i][j] = p.template get<5>()[i][j];
314 boost::fusion::at_c<0>(
data) = boost::fusion::at_c<0>(p.
data);
315 boost::fusion::at_c<1>(
data) = boost::fusion::at_c<1>(p.
data);
316 boost::fusion::at_c<2>(
data) = boost::fusion::at_c<2>(p.
data);
317 boost::fusion::at_c<3>(
data) = boost::fusion::at_c<3>(p.
data);
319 for (
size_t i = 0 ; i < 3 ; i++)
320 boost::fusion::at_c<4>(
data)[i] = boost::fusion::at_c<4>(p.
data)[i];
322 for (
size_t i = 0 ; i < 3 ; i++)
324 for (
size_t j = 0 ; j < 3 ; j++)
326 boost::fusion::at_c<5>(
data)[i][j] = boost::fusion::at_c<5>(p.
data)[i][j];
340 boost::fusion::at_c<0>(
data) = boost::fusion::at_c<0>(p.
data);
341 boost::fusion::at_c<1>(
data) = boost::fusion::at_c<1>(p.
data);
342 boost::fusion::at_c<2>(
data) = boost::fusion::at_c<2>(p.
data);
343 boost::fusion::at_c<3>(
data) = boost::fusion::at_c<3>(p.
data);
345 for (
size_t i = 0 ; i < 3 ; i++)
346 boost::fusion::at_c<4>(
data)[i] = boost::fusion::at_c<4>(p.
data)[i];
348 for (
size_t i = 0 ; i < 3 ; i++)
350 for (
size_t j = 0 ; j < 3 ; j++)
352 boost::fusion::at_c<5>(
data)[i][j] = boost::fusion::at_c<5>(p.
data)[i][j];
375 boost::fusion::at_c<0>(
data) = 1;
376 boost::fusion::at_c<1>(
data) = 2;
377 boost::fusion::at_c<2>(
data) = 3;
378 boost::fusion::at_c<3>(
data) = 4;
380 for (
size_t i = 0 ; i < 3 ; i++)
381 boost::fusion::at_c<4>(
data)[i] = 5;
383 for (
size_t i = 0 ; i < 3 ; i++)
385 for (
size_t j = 0 ; j < 3 ; j++)
387 boost::fusion::at_c<5>(
data)[i][j] = 6;
419 typedef boost::fusion::vector<T,T,T,T,T[3],T[3][3]>
type;
425 static const unsigned int x = 0;
428 static const unsigned int y = 1;
431 static const unsigned int z = 2;
434 static const unsigned int s = 3;
437 static const unsigned int v = 4;
440 static const unsigned int t = 5;
452 inline void setx(T x_) {boost::fusion::at_c<0>(
data) = x_;};
459 inline void sety(T y_) {boost::fusion::at_c<1>(
data) = y_;};
466 inline void setz(T z_) {boost::fusion::at_c<2>(
data) = z_;};
473 inline void sets(T s_) {boost::fusion::at_c<3>(
data) = s_;};
479 static const std::string
name[];
483 template<
unsigned int i>
inline typename boost::fusion::result_of::at<type, boost::mpl::int_<i> >
::type get() {
return boost::fusion::at_c<i>(
data);}
492 boost::fusion::at_c<0>(
data) = p.template get<0>();
493 boost::fusion::at_c<1>(
data) = p.template get<1>();
494 boost::fusion::at_c<2>(
data) = p.template get<2>();
495 boost::fusion::at_c<3>(
data) = p.template get<3>();
497 for (
size_t i = 0 ; i < 3 ; i++)
498 boost::fusion::at_c<4>(
data)[i] = p.template get<4>()[i];
500 for (
size_t i = 0 ; i < 3 ; i++)
502 for (
size_t j = 0 ; j < 3 ; j++)
504 boost::fusion::at_c<5>(
data)[i][j] = p.template get<5>()[i][j];
512 boost::fusion::at_c<0>(
data) = boost::fusion::at_c<0>(p.
data);
513 boost::fusion::at_c<1>(
data) = boost::fusion::at_c<1>(p.
data);
514 boost::fusion::at_c<2>(
data) = boost::fusion::at_c<2>(p.
data);
515 boost::fusion::at_c<3>(
data) = boost::fusion::at_c<3>(p.
data);
517 for (
size_t i = 0 ; i < 3 ; i++)
518 boost::fusion::at_c<4>(
data)[i] = boost::fusion::at_c<4>(p.
data)[i];
520 for (
size_t i = 0 ; i < 3 ; i++)
522 for (
size_t j = 0 ; j < 3 ; j++)
524 boost::fusion::at_c<5>(
data)[i][j] = boost::fusion::at_c<5>(p.
data)[i][j];
539 boost::fusion::at_c<0>(
data) = boost::fusion::at_c<0>(p.
data);
540 boost::fusion::at_c<1>(
data) = boost::fusion::at_c<1>(p.
data);
541 boost::fusion::at_c<2>(
data) = boost::fusion::at_c<2>(p.
data);
542 boost::fusion::at_c<3>(
data) = boost::fusion::at_c<3>(p.
data);
544 for (
size_t i = 0 ; i < 3 ; i++)
545 boost::fusion::at_c<4>(
data)[i] = boost::fusion::at_c<4>(p.
data)[i];
547 for (
size_t i = 0 ; i < 3 ; i++)
549 for (
size_t j = 0 ; j < 3 ; j++)
551 boost::fusion::at_c<5>(
data)[i][j] = boost::fusion::at_c<5>(p.
data)[i][j];
558 static inline bool noPointers()
572 typedef boost::fusion::vector<T,T,T,T>
type;
578 static const unsigned int x = 0;
581 static const unsigned int y = 1;
584 static const unsigned int z = 2;
587 static const unsigned int s = 3;
595 inline void setx(T x_) {boost::fusion::at_c<0>(
data) = x_;};
597 inline void sety(T y_) {boost::fusion::at_c<1>(
data) = y_;};
599 inline void setz(T z_) {boost::fusion::at_c<2>(
data) = z_;};
601 inline void sets(T s_) {boost::fusion::at_c<3>(
data) = s_;};
607 static const std::string
name[];
611 template<
unsigned int i>
inline typename boost::fusion::result_of::at<type, boost::mpl::int_<i> >
::type get() {
return boost::fusion::at_c<i>(
data);}
620 boost::fusion::at_c<0>(
data) = p.template get<0>();
621 boost::fusion::at_c<1>(
data) = p.template get<1>();
622 boost::fusion::at_c<2>(
data) = p.template get<2>();
623 boost::fusion::at_c<3>(
data) = p.template get<3>();
629 boost::fusion::at_c<0>(
data) = boost::fusion::at_c<0>(p.
data);
630 boost::fusion::at_c<1>(
data) = boost::fusion::at_c<1>(p.
data);
631 boost::fusion::at_c<2>(
data) = boost::fusion::at_c<2>(p.
data);
632 boost::fusion::at_c<3>(
data) = boost::fusion::at_c<3>(p.
data);
638 boost::fusion::at_c<0>(
data) = boost::fusion::at_c<0>(p.
data);
639 boost::fusion::at_c<1>(
data) = boost::fusion::at_c<1>(p.
data);
640 boost::fusion::at_c<2>(
data) = boost::fusion::at_c<2>(p.
data);
641 boost::fusion::at_c<3>(
data) = boost::fusion::at_c<3>(p.
data);
646 static inline bool noPointers()
Test structure used for several test.
boost::fusion::vector< T, T, T, T, T[2], T[2][2]> type_real
declaration of what the Point2D_test store
static const unsigned int max_prop
number of properties in the boost::fusion::vector
static const unsigned int y
y property is at position 1 in the boost::fusion::vector
static const unsigned int t
t property is at position 5 in the boost::fusion::vector
static const unsigned int v
v property is at position 4 in the boost::fusion::vector
static const unsigned int s
s property is at position 3 in the boost::fusion::vector
static const unsigned int x
x property is at position 0 in the boost::fusion::vector
boost::fusion::vector< T, T, T, T, T[2], T[2][2]> type
declaration of what the Point2D_test store
static const unsigned int max_prop_real
number of properties in the boost::fusion::vector
static bool noPointers()
indicate that this structure has no pointers
static constexpr bool stag_mask[]
in case of usage with staggered grid it define which properties are staggered in the cell grid
static const unsigned int z
z property is at position 2 in the boost::fusion::vector
Test structure used for several test.
boost::fusion::vector< T, T, T, T, T[3], T[3][3]> type
declaration of what the Point_test_prp store
static const unsigned int max_prop
maximum number of properties
Point_test_prp< T > operator=(const Point_test< T > &p)
Copy the point.
void sets(T s_)
set the s property
static const unsigned int y
y property is at position 1 in the boost::fusion::vector
void setx(T x_)
set the x property
void setz(T z_)
set the z property
static const unsigned int s
s property is at position 3 in the boost::fusion::vector
static const unsigned int x
x property is at position 0 in the boost::fusion::vector
static const unsigned int z
z property is at position 2 in the boost::fusion::vector
static const unsigned int v
v property is at position 4 in the boost::fusion::vector
Point_test_prp()
Default constructor.
Point_test_prp(const encapc< 1, Point_test_prp< T >, Mem > &p)
constructor from encapc
boost::fusion::result_of::at< type, boost::mpl::int_< i > >::type get()
getter method for a general property i
static const unsigned int t
t property is at position 5 in the boost::fusion::vector
Point_test_prp(const Point_test_prp< T > &p)
constructor from another point
void sety(T y_)
set the y property
point test with only scalar properties
static const unsigned int s
s property is at position 0 in the boost::fusion::vector
Point_test_scal()
Default constructor.
void sets(T s_)
set the property s
Point_test_scal(const encapc< 1, Point_test_scal< T >, Mem > &p)
constructor from encapc
type data
The data itself.
Point_test_scal(const Point_test_scal< T > &p)
constructor from another point
Point_test_scal< T > operator=(const Point_test_scal< T > &p)
operator=
static const unsigned int z
z property is at position 0 in the boost::fusion::vector
void sety(T y_)
set the property y
void setz(T z_)
set the property z
boost::fusion::vector< T, T, T, T > type
declaration of what the Point_test_scal store
void setx(T x_)
set the property x
boost::fusion::result_of::at< type, boost::mpl::int_< i > >::type get()
getter method for the property i
static const unsigned int max_prop
the number of properties
static const unsigned int x
x property is at position 0 in the boost::fusion::vector
static const unsigned int y
y property is at position 1 in the boost::fusion::vector
Test structure used for several test.
type data
The object itself.
static const unsigned int max_prop
number of properties in the boost::fusion::vector
bool operator==(const Point_test< float > &p) const
check if two point match
static const unsigned int x
x property is at position 0 in the boost::fusion::vector
boost::fusion::vector< T, T, T, T, T[3], T[3][3]> type_real
declaration of what the Point_test store
boost::fusion::vector< T, T, T, T, T[3], T[3][3]> type
declaration of what the Point_test store
void sety(T y_)
set the y property
__device__ __host__ Point_test< T > & operator=(const Point_test< T > &p)
Copy the point.
static const unsigned int s
s property is at position 3 in the boost::fusion::vector
void setv(size_t i, T v_)
set the v property
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
Point_test< float > & operator+=(const Point_test< float > &p)
Sum the point.
static const unsigned int z
z property is at position 2 in the boost::fusion::vector
void setx(T x_)
set the x property
Point_test()
Default constructor.
Point_test(const encapc< dim, Point_test< T >, Mem > &p)
Copy constructor from encapc (encapsulated point)
auto get() const -> decltype(boost::fusion::at_c< i >(data))
getter method for a general property i
static constexpr bool stag_mask[]
in case usage with a staggered grid indicate which properties are staggered in the cell
static const unsigned int max_prop_real
number of properties in the boost::fusion::vector
void sett(size_t i, size_t j, T t_)
set the t property
Point_test(const Point_test< T > &p)
constructor from another point
static const unsigned int t
t property is at position 5 in the boost::fusion::vector
static bool noPointers()
noPointers function
static const std::string name[]
array of attributes name
static const std::string name[]
array of names