OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
Pack_selector.hpp
1 /*
2  * Pack_selector.hpp
3  *
4  * Created on: Jul 15, 2015
5  * Author: Pietro Incardona
6  */
7 
8 
9 #ifndef SRC_PACK_AAA_SELECTOR_HPP_
10 #define SRC_PACK_AAA_SELECTOR_HPP_
11 
12 #include <type_traits>
13 #include "util/common.hpp"
14 #include "Grid/Encap.hpp"
15 #include "Grid/util.hpp"
16 #include "Vector/util.hpp"
17 
19 #define PACKER_PRIMITIVE 1
20 #define PACKER_ARRAY_PRIMITIVE 2
22 #define PACKER_ENCAP_OBJECTS 3
24 #define PACKER_VECTOR 4
26 #define PACKER_GRID 5
28 #define PACKER_OBJECTS_WITH_WARNING_POINTERS 6
30 #define PACKER_OBJECTS_WITH_POINTER_CHECK 7
32 
33 #define IS_ENCAP 4
34 #define IS_GRID 2
35 #define IS_VECTOR 1
36 
41 template <typename T, bool has_noPointers>
43 {
44  enum
45  {
46  value = PACKER_OBJECTS_WITH_POINTER_CHECK
47  };
48 };
49 
50 template <typename T>
52 {
53  enum
54  {
55  value = PACKER_OBJECTS_WITH_WARNING_POINTERS
56  };
57 };
58 
63 template <typename T, int known_type>
65 {
66  enum
67  {
69  };
70 };
71 
72 template <typename T>
74 {
75  enum
76  {
77  value = PACKER_GRID
78  };
79 };
80 
81 template <typename T>
82 struct Pack_selector_known_type_impl<T,IS_VECTOR>
83 {
84  enum
85  {
86  value = PACKER_VECTOR
87  };
88 };
89 
90 template <typename T>
92 {
93  enum
94  {
95  value = PACKER_ENCAP_OBJECTS
96  };
97 };
98 
100 
103 template<typename T, bool is_foundamental>
105 {
106  enum
107  {
109  };
110 };
111 
115 template<typename T>
116 struct Pack_selector_impl<T,true>
117 {
118  enum
119  {
120  value = PACKER_PRIMITIVE
121  };
122 };
123 
125 
130 template <typename T>
132 {
133  enum
134  {
136  };
137 };
138 
139 
140 #endif /* SRC_PACK_SELECTOR_HPP_ */
Pack selector for unknown type.
Pack selector.
Definition: util.hpp:14
it is not a fundamental type
Pack selector for unknown type.