OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
util_test.hpp
1 /*
2  * util_test.hpp
3  *
4  * Created on: May 31, 2015
5  * Author: Pietro Incardona
6  */
7 
8 #ifndef UTIL_TEST_HPP_
9 #define UTIL_TEST_HPP_
10 
11 #include "config.h"
12 #include "object_util.hpp"
13 #include "Point_test.hpp"
14 #include "util/ct_array.hpp"
15 #include "Vector/map_vector.hpp"
16 #include "common.hpp"
17 #include "check_no_pointers.hpp"
18 #include "Grid/util.hpp"
19 
20 #include "util/convert.hpp"
21 #include <iostream>
22 #include "mul_array_extents.hpp"
23 #include "Packer_Unpacker/has_max_prop.hpp"
24 
27 {
29  static const unsigned int max_prop = 6;
30 };
31 
34 {
35 };
36 
38 
40 
43 {
45  float data;
46 
48  static constexpr bool stag_mask[] = {true,false,true};
49 };
50 
53 {
55  float data;
56 };
57 
59 
61 
64 {
66  struct attributes
67  {
69  static const std::string name[2];
70  };
71 };
72 
73 // attribute names
74 const std::string test_has_attributes::attributes::name[]={"attributes1","attributes2"};
75 
77 {
78 };
79 
81 
82 BOOST_AUTO_TEST_SUITE( util_test )
83 
84 BOOST_AUTO_TEST_CASE( object_s_di_test )
85 {
86  // Object write test
87 
89  typedef Point_test<float> p;
90  typedef Point_test<float>::type vboost;
91  typedef object_creator<Point_test<float>::type,0,1,4>::type vboost_red;
92 
93  object<vboost> dst;
95 
96  // fill the source properties 0,1,2 with data
97 
98  boost::fusion::at_c<0>(src.data) = 1.0;
99  boost::fusion::at_c<1>(src.data) = 2.0;
100 
101  for (size_t i = 0 ; i < 3 ; i++)
102  boost::fusion::at_c<2>(src.data)[i] = i + 5.0;
103 
104  // copy from src to dst
105  object_s_di<object<vboost_red>,object<vboost>,OBJ_NORMAL,0,1,4>(src,dst);
106 
107  // Check the result
108  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::x>(dst.data),1.0);
109  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::y>(dst.data),2.0);
110 
111  for (size_t i = 0 ; i < 3 ; i++)
112  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::v>(dst.data)[i],i + 5.0);
113 
115 
117 
118  typedef encapc<1,Point_test<float>,openfpm::vector<Point_test<float>>::layout_type> encap_dst;
119  typedef encapc<1,object<vboost_red>,openfpm::vector<object<vboost_red>>::layout_type> encap_src;
120 
121  openfpm::vector<p> v_point;
123 
124  v_point.resize(2);
125  v_point_red.resize(2);
126 
127  v_point_red.template get<0>(0) = 11.0;
128  v_point_red.template get<1>(0) = 12.0;
129 
130  for (size_t i = 0 ; i < 3 ; i++)
131  v_point_red.template get<2>(0)[i] = i + 15.0;
132 
133  auto dst_e = v_point.get(0);
134  auto src_e = v_point_red.get(0);
135 
137 
138  BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::x>(),11.0);
139  BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::y>(),12.0);
140 
141  for (size_t i = 0 ; i < 3 ; i++)
142  BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::v>()[i],i + 15.0);
143 
145 }
146 
147 BOOST_AUTO_TEST_CASE( object_s_di_op_test )
148 {
149  // Object write test
150 
152  typedef Point_test<float> p;
153  typedef Point_test<float>::type vboost;
154  typedef object_creator<Point_test<float>::type,0,1,4>::type vboost_red;
155 
156  object<vboost> dst;
157  object<vboost_red> src;
158 
159  // fill the source properties 0,1,2 with data
160 
161  boost::fusion::at_c<0>(src.data) = 1.0;
162  boost::fusion::at_c<1>(src.data) = 2.0;
163 
164  for (size_t i = 0 ; i < 3 ; i++)
165  boost::fusion::at_c<2>(src.data)[i] = i + 5.0;
166 
167  boost::fusion::at_c<0>(dst.data) = 2.0;
168  boost::fusion::at_c<1>(dst.data) = 3.0;
169 
170  for (size_t i = 0 ; i < 3 ; i++)
171  boost::fusion::at_c<4>(dst.data)[i] = i + 7.0;
172 
173  // copy from src to dst
174  object_s_di_op<add_,object<vboost_red>,object<vboost>,OBJ_NORMAL,0,1,4>(src,dst);
175 
176  // Check the result
177  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::x>(dst.data),3.0);
178  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::y>(dst.data),5.0);
179 
180  for (size_t i = 0 ; i < 3 ; i++)
181  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::v>(dst.data)[i],2*i + 12.0);
182 
184 
186 
187  typedef encapc<1,Point_test<float>,openfpm::vector<Point_test<float>>::layout_type> encap_dst;
188  typedef encapc<1,object<vboost_red>,openfpm::vector<object<vboost_red>>::layout_type> encap_src;
189 
190  openfpm::vector<p> v_point;
192 
193  v_point.resize(2);
194  v_point_red.resize(2);
195 
196  v_point_red.template get<0>(0) = 11.0;
197  v_point_red.template get<1>(0) = 12.0;
198 
199  v_point.template get<0>(0) = 10.0;
200  v_point.template get<1>(0) = 9.0;
201 
202  for (size_t i = 0 ; i < 3 ; i++)
203  v_point_red.template get<2>(0)[i] = i + 8.0;
204 
205  for (size_t i = 0 ; i < 3 ; i++)
206  v_point.template get<4>(0)[i] = i + 3.0;
207 
208  auto dst_e = v_point.get(0);
209  auto src_e = v_point_red.get(0);
210 
212 
213  BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::x>(),21.0);
214  BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::y>(),21.0);
215 
216  for (size_t i = 0 ; i < 3 ; i++)
217  BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::v>()[i],2*i + 11.0);
218 
220 }
221 
222 BOOST_AUTO_TEST_CASE( object_prop_copy )
223 {
224  {
226  typedef Point_test<float> p;
227  typedef Point_test<float>::type vboost;
228  typedef object_creator<Point_test<float>::type,0,1,4>::type vboost_red;
229 
230  object<vboost> src;
231  object<vboost_red> dst;
232 
233  // fill the source properties x,y,v = 0,1,4 with data
234 
235  boost::fusion::at_c<p::x>(src.data) = 1.0;
236  boost::fusion::at_c<p::y>(src.data) = 2.0;
237 
238  for (size_t i = 0 ; i < 3 ; i++)
239  boost::fusion::at_c<p::v>(src.data)[i] = i + 5.0;
240 
241  // copy from src to dst
242  object_si_d<object<vboost>,object<vboost_red>,OBJ_NORMAL,0,1,4>(src,dst);
243 
244  // Check the result
245  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<0>(dst.data),1.0);
246  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<1>(dst.data),2.0);
247 
248  for (size_t i = 0 ; i < 3 ; i++)
249  BOOST_REQUIRE_EQUAL(boost::fusion::at_c<2>(dst.data)[i],i + 5.0);
250 
252 
254 
255  typedef encapc<1,Point_test<float>,openfpm::vector<Point_test<float>>::layout_type> encap_src;
256  typedef encapc<1,object<vboost_red>,openfpm::vector<object<vboost_red>>::layout_type> encap_dst;
257 
258  openfpm::vector<p> v_point;
260 
261  v_point.resize(2);
262  v_point_red.resize(2);
263 
264  v_point.template get<p::x>(0) = 1.0;
265  v_point.template get<p::y>(0) = 2.0;
266 
267  for (size_t i = 0 ; i < 3 ; i++)
268  v_point.template get<p::v>(0)[i] = i + 5.0;
269 
270  auto src_e = v_point.get(0);
271  auto dst_e = v_point_red.get(0);
272 
274 
275  BOOST_REQUIRE_EQUAL(v_point_red.get(0).template get<0>(),1.0);
276  BOOST_REQUIRE_EQUAL(v_point_red.get(0).template get<1>(),2.0);
277 
278  for (size_t i = 0 ; i < 3 ; i++)
279  BOOST_REQUIRE_EQUAL(v_point_red.get(0).template get<2>()[i],i + 5.0);
280 
282  }
283 
284 
285  {
287  struct no_method_pointer
288  {
289  float a;
290  int b;
291  };
292 
293  struct no_pointer
294  {
295  double c;
296  int d;
297 
298  static bool noPointers() {return true;}
299  };
300 
301  struct with_pointer
302  {
303  double * c;
304  int d;
305 
306  static bool noPointers() {return false;}
307  };
308 
309  typedef boost::fusion::vector<int,float,double,no_method_pointer,no_pointer,with_pointer,no_method_pointer> v;
310 
311  int val = boost::mpl::size< noPointers_sequence<v,0,2>::type >::value;
312  BOOST_REQUIRE_EQUAL(val,0);
313 
314  val = boost::mpl::size< noPointers_sequence<v,0,2,4,5>::type >::value;
315  BOOST_REQUIRE_EQUAL(val,0);
316 
317  val = boost::mpl::size< noPointers_sequence<v,0,1,2,3,4,5,6>::type >::value;
318  BOOST_REQUIRE_EQUAL(val,2);
319 
320  typedef boost::fusion::vector<int *,float &,double *,no_method_pointer *,no_pointer &,with_pointer *,no_method_pointer &> vp;
321 
322  val = boost::mpl::size< noPointers_sequence<vp,0,1,2,3,4,5,6>::type >::value;
323  BOOST_REQUIRE_EQUAL(val,2);
324 
326  }
327 
328  // Check the the object respect the noPointers construction
329  {
330 
331  struct no_method_pointer
332  {
333  float a;
334  int b;
335  };
336 
337  struct no_pointer
338  {
339  double c;
340  int d;
341 
342  static bool noPointers() {return true;}
343  };
344 
345  struct with_pointer
346  {
347  double * c;
348  int d;
349 
350  static bool noPointers() {return false;}
351  };
352 
353  typedef boost::fusion::vector<int,float,double> v;
354  int val = object<v>::noPointers();
355  BOOST_REQUIRE_EQUAL(val,PNP::NO_POINTERS);
356 
357  typedef boost::fusion::vector<int,float,double,no_pointer> va;
358  val = object<va>::noPointers();
359  BOOST_REQUIRE_EQUAL(val,PNP::NO_POINTERS);
360 
361  typedef boost::fusion::vector<int,float,double,no_pointer,with_pointer> vb;
362  val = object<vb>::noPointers();
363  BOOST_REQUIRE_EQUAL(val,PNP::POINTERS);
364 
365  typedef boost::fusion::vector<int,float,double,no_pointer,double *> vc;
366  val = object<vc>::noPointers();
367  BOOST_REQUIRE_EQUAL(val,PNP::POINTERS);
368 
369  typedef boost::fusion::vector<int,float,double,no_pointer,double &> vd;
370  val = object<vd>::noPointers();
371  BOOST_REQUIRE_EQUAL(val,PNP::POINTERS);
372 
373  typedef boost::fusion::vector<int,float,double,no_pointer,double[3]> ve;
374  val = object<ve>::noPointers();
375  BOOST_REQUIRE_EQUAL(val,PNP::NO_POINTERS);
376 
377  typedef boost::fusion::vector<int,float,double,no_pointer,no_pointer *> vf;
378  val = object<vf>::noPointers();
379  BOOST_REQUIRE_EQUAL(val,PNP::POINTERS);
380 
381  typedef boost::fusion::vector<int,float,double,no_pointer,no_pointer &> vg;
382  val = object<vg>::noPointers();
383  BOOST_REQUIRE_EQUAL(val,PNP::POINTERS);
384 
385  typedef boost::fusion::vector<int,float,double,no_pointer,no_pointer[3]> vh;
386  val = object<vh>::noPointers();
387  BOOST_REQUIRE_EQUAL(val,PNP::NO_POINTERS);
388  }
389 }
390 
391 
392 BOOST_AUTO_TEST_CASE( generate_array )
393 {
394  {
396  const size_t count = 5;
397  typedef typename ::generate_array<size_t,count, MetaFunc>::result ct_test;
398 
399  // ct_test::data is equivalent to const size_t [5] = {5,6,7,8,9}
400 
401  for (size_t i = 0 ; i < count; ++i)
402  {
403  const size_t ct_val = ct_test::data[i];
404  BOOST_REQUIRE_EQUAL(ct_val,count+i);
405  }
407  }
408 
409  // check constexpr compile time array as template parameters
410 
411 #ifndef COVERTY_SCAN
412 
413  {
415  const size_t count = 5;
416  typedef typename ::generate_array_constexpr<size_t,count, MetaFunc>::result ct_test_ce;
417 
418  // ct_test_ce::data is equivalent to constexpr size_t [5] = {5,6,7,8,9}
419 
421  BOOST_REQUIRE_EQUAL(ct_calc,11ul);
423  }
424 
425 #endif
426 
427 
428  {
430  const size_t count = 5;
431  typedef typename ::generate_indexes<size_t,count, MetaFuncOrd>::result ct_test_ce;
432 
433  bool check = std::is_same<ct_test_ce,index_tuple<0,1,2,3,4>>::value;
434  BOOST_REQUIRE_EQUAL(check,true);
436  }
437 }
438 
439 BOOST_AUTO_TEST_CASE( check_templates_util_function )
440 {
441  {
442  {
443 
445 
446  struct test_pack
447  {
448  static bool pack() {return true;}
449  };
450 
451  struct test_unknown_pack
452  {
453  };
454 
455  BOOST_REQUIRE_EQUAL(has_pack<test_pack>::type::value,true);
456  BOOST_REQUIRE_EQUAL(has_pack<test_unknown_pack>::type::value,false);
457 
459 
460  struct test_packRequest
461  {
462  static bool packRequest() {return false;}
463  };
464 
465  struct test_unknown_packRequest
466  {
467  };
468 
469  BOOST_REQUIRE_EQUAL(has_packRequest<test_packRequest>::type::value,true);
471 
473 
474  struct test_packMem
475  {
476  static bool packMem() {return true;}
477  };
478 
479  struct test_unknown_packMem
480  {
481  };
482 
483  BOOST_REQUIRE_EQUAL(has_packMem<test_packMem>::type::value,true);
484  BOOST_REQUIRE_EQUAL(has_packMem<test_unknown_packMem>::type::value,false);
485 
486 
488 
489  struct test_no_ptr
490  {
491  static bool noPointers() {return true;}
492  };
493 
494  struct test_ptr
495  {
496  static bool noPointers() {return false;}
497  };
498 
499  struct test_unknown
500  {
501  };
502 
503  BOOST_REQUIRE_EQUAL(has_noPointers<test_no_ptr>::type::value,true);
504  BOOST_REQUIRE_EQUAL(has_noPointers<test_ptr>::type::value,true);
505  BOOST_REQUIRE_EQUAL(has_noPointers<test_unknown>::type::value,false);
506 
508 
509  }
510 
511  {
513 
514  int val = is_openfpm_native<Point_test<float>>::value;
515  BOOST_REQUIRE_EQUAL(val, true);
517  BOOST_REQUIRE_EQUAL(val, false);
518 
520  }
521 
522  {
524 
525  struct test_typedef_same_data
526  {
527  typedef boost::fusion::vector<float,double,float[3]> type;
528 
529  type data;
530  };
531 
532  struct test_typedef_not_same_data
533  {
534  typedef boost::fusion::vector<float,double,float[3]> type;
535 
536  boost::fusion::vector<float,double> data;
537  };
538 
540  BOOST_REQUIRE_EQUAL(val, true);
542  BOOST_REQUIRE_EQUAL(val, false);
543 
545  }
546 
547  {
549 
550  struct test_has_data
551  {
552  float data;
553  };
554 
555  struct test_no_has_data
556  {
557  };
558 
560  BOOST_REQUIRE_EQUAL(val, true);
562  BOOST_REQUIRE_EQUAL(val, false);
563 
565  }
566 
567  {
569 
571  BOOST_REQUIRE_EQUAL(val, true);
573  BOOST_REQUIRE_EQUAL(val, false);
574 
575 
577  BOOST_REQUIRE_EQUAL(val, true);
579 #ifndef SE_CLASS3
580  BOOST_REQUIRE_EQUAL(val, 3);
581 #endif
582 
584  }
585 
586  {
588 
589  struct test_has_value_type
590  {
591  typedef int value_type;
592  };
593 
594  struct test_has_no_value_type
595  {
596 
597  };
598 
600  BOOST_REQUIRE_EQUAL(val, true);
602  BOOST_REQUIRE_EQUAL(val, false);
603 
605  }
606 
607 
608  {
610 
612  BOOST_REQUIRE_EQUAL(val, true);
614  BOOST_REQUIRE_EQUAL(val, false);
615 
617  }
618 
619  {
621 
622  struct test_has_typedef
623  {
624  typedef float type;
625  };
626 
627  struct test_no_has_data
628  {
629  };
630 
632  BOOST_REQUIRE_EQUAL(val, true);
634  BOOST_REQUIRE_EQUAL(val, false);
635 
637  }
638 
639  {
641 
643  BOOST_REQUIRE_EQUAL(val, true);
645  BOOST_REQUIRE_EQUAL(val, false);
646 
648  }
649 
651  struct test_no_ptr
652  {
653  static bool noPointers() {return PNP::NO_POINTERS;}
654  };
655 
656  struct test_ptr
657  {
658  static bool noPointers() {return PNP::POINTERS;}
659  };
660 
661  struct test_unknown
662  {
663  };
664 
666  BOOST_REQUIRE_EQUAL(val,PNP::NO_POINTERS);
668  BOOST_REQUIRE_EQUAL(val,PNP::POINTERS);
670  BOOST_REQUIRE_EQUAL(val,PNP::UNKNOWN);
671 
673 
674  {
676 
677  struct stub_object
678  {
679  float a;
680  double b;
681  };
682 
683  bool val = is_grid< grid_cpu<2,aggregate<float> > >::value;
684  BOOST_REQUIRE_EQUAL( val ,true);
686  BOOST_REQUIRE_EQUAL( val , true);
688  BOOST_REQUIRE_EQUAL( val ,true);
689 
690  val = is_grid< grid_gpu<2,aggregate<float> > >::value;
691  BOOST_REQUIRE_EQUAL(val ,true);
693  BOOST_REQUIRE_EQUAL(val, true);
695  BOOST_REQUIRE_EQUAL(val,true);
696 
698  BOOST_REQUIRE_EQUAL( val, false);
699  val = is_grid< stub_object > ::value;
700  BOOST_REQUIRE_EQUAL( val, false);
701 
703  }
704 
705  {
707 
708  struct stub_object
709  {
710  float a;
711  double b;
712  };
713 
714  bool val = is_vector< openfpm::vector<aggregate<float> > >::value;
715  BOOST_REQUIRE_EQUAL( val ,true);
717  BOOST_REQUIRE_EQUAL( val , true);
719  BOOST_REQUIRE_EQUAL( val ,true);
720 
722  BOOST_REQUIRE_EQUAL(val ,true);
724  BOOST_REQUIRE_EQUAL(val, true);
726  BOOST_REQUIRE_EQUAL(val,true);
727 
729  BOOST_REQUIRE_EQUAL( val, false);
730  val = is_vector< stub_object > ::value;
731  BOOST_REQUIRE_EQUAL( val, false);
732 
734  }
735 
736  {
738 
739  struct stub_object
740  {
741  float a;
742  double b;
743  };
744 
746  BOOST_REQUIRE_EQUAL( val ,true);
748  BOOST_REQUIRE_EQUAL( val , true);
750  BOOST_REQUIRE_EQUAL( val ,true);
751 
753  BOOST_REQUIRE_EQUAL( val ,true);
755  BOOST_REQUIRE_EQUAL( val , true);
757  BOOST_REQUIRE_EQUAL( val ,true);
758 
760  BOOST_REQUIRE_EQUAL( val, false);
761  val = is_encap< stub_object > ::value;
762  BOOST_REQUIRE_EQUAL( val, false);
763 
765  }
766 
767  {
769 
770  size_t mul = array_extents<float>::mul();
771  BOOST_REQUIRE_EQUAL(mul,1ul);
773  BOOST_REQUIRE_EQUAL(mul,3ul);
775  BOOST_REQUIRE_EQUAL(mul,3ul*2ul);
777  BOOST_REQUIRE_EQUAL(mul,3ul*2ul*5ul);
778 
780  }
781 
782  {
784 
786  BOOST_REQUIRE_EQUAL(val,true);
788  BOOST_REQUIRE_EQUAL(val,false);
789 
791  BOOST_REQUIRE_EQUAL(val,false);
793  BOOST_REQUIRE_EQUAL(val,true);
794 
796  }
797 
799  {
801 
803 
804  BOOST_REQUIRE_EQUAL(val,true);
805 
806  typedef aggregate<float, Point_test<float>> aggr2;
807 
809 
810  BOOST_REQUIRE_EQUAL(val,false);
811 
812  }
814 
815  }
816 }
817 
818 BOOST_AUTO_TEST_CASE( check_convert_function )
819 {
820  {
822 
823  comb<2> c;
824  c.c[0] = 1;
825  c.c[1] = -1;
826 
828 
829  BOOST_REQUIRE_EQUAL(p.get(0),1ul);
830  BOOST_REQUIRE_EQUAL(p.get(1),(size_t)-1);
831 
833  }
834 
835  {
837 
838  comb<3> c;
839  c.c[0] = 1;
840  c.c[1] = -1;
841  c.c[2] = 0;
842 
844 
845  BOOST_REQUIRE_EQUAL(p.get(0),1);
846  BOOST_REQUIRE_EQUAL(p.get(1),-1);
847  BOOST_REQUIRE_EQUAL(p.get(2),0);
848 
850  }
851 }
852 
853 
854 BOOST_AUTO_TEST_CASE( is_contiguos_test)
855 {
856  {
857  bool test = is_contiguos<1,2>::type::value;
858 
859  BOOST_REQUIRE_EQUAL(test,true);
860 
862 
863  BOOST_REQUIRE_EQUAL(test,false);
864 
866 
867  BOOST_REQUIRE_EQUAL(test,true);
868 
870 
871  BOOST_REQUIRE_EQUAL(test,false);
872 
874 
875  BOOST_REQUIRE_EQUAL(test,false);
876 
878 
879  BOOST_REQUIRE_EQUAL(test,false);
880  }
881 }
882 
883 
884 BOOST_AUTO_TEST_SUITE_END()
885 
886 #endif /* UTIL_TEST_HPP_ */
It copy the properties from one object to another.
Transform the boost::fusion::vector into memory specification (memory_traits)
Definition: memory_conf.hpp:93
boost::fusion::vector< T, T, T, T, T[3], T[3][3]> type
declaration of what the Point_test store
Definition: Point_test.hpp:120
Position of the element of dimension d in the hyper-cube of dimension dim.
Definition: comb.hpp:34
has_Pack check if a type has defined a method called Pack
Definition: common.hpp:205
Main class to generate compile-time array.
Definition: ct_array.hpp:169
check if T::type and T.data has the same type
Definition: common.hpp:154
static Point< dim, St > convert(const comb< dim > &c)
Return the combination converted to point.
Definition: convert.hpp:25
has_packRequest check if a type has defined a method called packRequest
Definition: common.hpp:225
Define attribute names.
Definition: util_test.hpp:66
This class implement the point shape in an N-dimensional space.
Definition: Point.hpp:22
This is a container to create a general object.
static const unsigned int max_prop
define that the type has 6 properties
Definition: util_test.hpp:29
Transform the boost::fusion::vector into memory specification (memory_traits)
Definition: memory_conf.hpp:52
This class check if the type T has pointers inside.
is_openfpm_native check if a type is an openfpm native structure type
Definition: common.hpp:270
static const std::string name[2]
This test structure has 2 attribute names.
Definition: util_test.hpp:69
float data
unused
Definition: util_test.hpp:45
static constexpr bool stag_mask[]
staggered mask
Definition: util_test.hpp:48
It model an expression expr1 * expr2.
Definition: mul.hpp:119
test type for has_max_prop
Definition: util_test.hpp:33
It copy the properties from one object to another applying an operation.
Definition: util.hpp:14
const T & get(size_t i) const
Get coordinate.
Definition: Point.hpp:142
test type for has_max_prop
Definition: util_test.hpp:26
return if true the aggregate type T has a property that has a complex packing(serialization) method ...
[Check has_posMask struct definition]
Definition: util_test.hpp:42
[Metafunction definition]
Definition: common.hpp:297
Struct that give functionalities on array extensions.
has_calculateMem check if a type has defined a method called calculateMem
Definition: common.hpp:245
[Check has_posMask struct definition]
Definition: util_test.hpp:63
It create a boost::fusion vector with the selected properties.
float data
unused
Definition: util_test.hpp:55
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...
Definition: aggregate.hpp:81
Test structure used for several test.
Definition: Point_test.hpp:105
Implementation of 1-D std::vector like structure.
Definition: map_vector.hpp:61
test type for has_posMask
Definition: util_test.hpp:52
static size_t value()
Return true if the structure T has a pointer.
char c[dim]
Array that store the combination.
Definition: comb.hpp:37
It copy the properties from one object to another.