11 #ifndef KOKKOS_ANALYZE_STOKHOS_SHAPE_HPP
12 #define KOKKOS_ANALYZE_STOKHOS_SHAPE_HPP
40 template<
class T,
class Layout >
41 struct AnalyzeStokhosShape :
public Shape< sizeof(T) , 0 >
43 typedef void specialize ;
45 typedef Shape< sizeof(T), 0 > shape ;
47 typedef T array_intrinsic_type ;
48 typedef T flat_array_type ;
51 typedef const T const_array_intrinsic_type ;
52 typedef const T const_flat_array_type ;
53 typedef const T const_value_type ;
54 typedef const T const_type ;
55 typedef T non_const_array_intrinsic_type ;
56 typedef T non_const_flat_array_type ;
57 typedef T non_const_value_type ;
58 typedef T non_const_type ;
61 template<
class Layout>
62 struct AnalyzeStokhosShape<void, Layout> :
public Shape< 0 , 0 >
64 typedef void specialize ;
66 typedef Shape< 0 , 0 > shape ;
68 typedef void array_intrinsic_type ;
69 typedef void flat_array_type ;
72 typedef const void const_array_intrinsic_type ;
73 typedef const void const_flat_array_type ;
74 typedef const void const_value_type ;
75 typedef const void const_type ;
76 typedef void non_const_array_intrinsic_type ;
77 typedef void non_const_flat_array_type ;
78 typedef void non_const_value_type ;
79 typedef void non_const_type ;
82 template<
class T,
class Layout >
83 struct AnalyzeStokhosShape< const T, Layout > :
84 public AnalyzeStokhosShape<T, Layout>::shape
87 typedef AnalyzeStokhosShape<T, Layout> nested ;
90 typedef typename nested::specialize specialize ;
92 typedef typename nested::shape shape ;
94 typedef typename nested::const_array_intrinsic_type array_intrinsic_type ;
95 typedef typename nested::const_flat_array_type flat_array_type ;
96 typedef typename nested::const_value_type
value_type ;
97 typedef typename nested::const_type type ;
99 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type ;
100 typedef typename nested::const_flat_array_type const_flat_array_type ;
101 typedef typename nested::const_value_type const_value_type ;
102 typedef typename nested::const_type const_type ;
104 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type ;
105 typedef typename nested::non_const_flat_array_type non_const_flat_array_type ;
106 typedef typename nested::non_const_value_type non_const_value_type ;
107 typedef typename nested::non_const_type non_const_type ;
110 template<
class T,
class Layout >
111 struct AnalyzeStokhosShape< T *, Layout >
112 :
public ShapeInsert< typename AnalyzeStokhosShape<T,Layout>::shape , 0 >::type
115 typedef AnalyzeStokhosShape<T, Layout> nested ;
118 typedef typename nested::specialize specialize ;
120 typedef typename ShapeInsert< typename nested::shape , 0 >::type shape ;
122 typedef typename nested::array_intrinsic_type * array_intrinsic_type ;
123 typedef typename nested::flat_array_type * flat_array_type ;
125 typedef typename nested::type * type ;
127 typedef typename nested::const_array_intrinsic_type * const_array_intrinsic_type ;
128 typedef typename nested::const_flat_array_type * const_flat_array_type ;
129 typedef typename nested::const_value_type const_value_type ;
130 typedef typename nested::const_type * const_type ;
132 typedef typename nested::non_const_array_intrinsic_type * non_const_array_intrinsic_type ;
133 typedef typename nested::non_const_flat_array_type * non_const_flat_array_type ;
134 typedef typename nested::non_const_value_type non_const_value_type ;
135 typedef typename nested::non_const_type * non_const_type ;
138 template<
class T,
class Layout >
139 struct AnalyzeStokhosShape< T[], Layout >
140 :
public ShapeInsert< typename AnalyzeStokhosShape<T, Layout>::shape , 0 >::type
143 typedef AnalyzeStokhosShape<T, Layout> nested ;
146 typedef typename nested::specialize specialize ;
148 typedef typename ShapeInsert< typename nested::shape , 0 >::type shape ;
150 typedef typename nested::array_intrinsic_type array_intrinsic_type [] ;
151 typedef typename nested::flat_array_type flat_array_type [] ;
153 typedef typename nested::type type [] ;
155 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type [] ;
156 typedef typename nested::const_flat_array_type const_flat_array_type [] ;
157 typedef typename nested::const_value_type const_value_type ;
158 typedef typename nested::const_type const_type [] ;
160 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type [] ;
161 typedef typename nested::non_const_flat_array_type non_const_flat_array_type [] ;
162 typedef typename nested::non_const_value_type non_const_value_type ;
163 typedef typename nested::non_const_type non_const_type [] ;
166 template<
class T,
class Layout >
167 struct AnalyzeStokhosShape< const T[], Layout >
168 :
public ShapeInsert< typename AnalyzeStokhosShape< const T, Layout >::shape , 0 >::type
171 typedef AnalyzeStokhosShape< const T, Layout > nested ;
174 typedef typename nested::specialize specialize ;
176 typedef typename ShapeInsert< typename nested::shape , 0 >::type shape ;
178 typedef typename nested::array_intrinsic_type array_intrinsic_type [] ;
179 typedef typename nested::flat_array_type flat_array_type [] ;
181 typedef typename nested::type type [] ;
183 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type [] ;
184 typedef typename nested::const_flat_array_type const_flat_array_type [] ;
185 typedef typename nested::const_value_type const_value_type ;
186 typedef typename nested::const_type const_type [] ;
188 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type [] ;
189 typedef typename nested::non_const_flat_array_type non_const_flat_array_type [] ;
190 typedef typename nested::non_const_value_type non_const_value_type ;
191 typedef typename nested::non_const_type non_const_type [] ;
194 template<
class T,
class Layout ,
unsigned N >
195 struct AnalyzeStokhosShape< T[N], Layout >
196 :
public ShapeInsert< typename AnalyzeStokhosShape<T, Layout>::shape , N >::type
199 typedef AnalyzeStokhosShape<T, Layout> nested ;
202 typedef typename nested::specialize specialize ;
204 typedef typename ShapeInsert< typename nested::shape , N >::type shape ;
206 typedef typename nested::array_intrinsic_type array_intrinsic_type [N] ;
207 typedef typename nested::flat_array_type flat_array_type [N] ;
209 typedef typename nested::type type [N] ;
211 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type [N] ;
212 typedef typename nested::const_flat_array_type const_flat_array_type [N] ;
213 typedef typename nested::const_value_type const_value_type ;
214 typedef typename nested::const_type const_type [N] ;
216 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type [N] ;
217 typedef typename nested::non_const_flat_array_type non_const_flat_array_type [N] ;
218 typedef typename nested::non_const_value_type non_const_value_type ;
219 typedef typename nested::non_const_type non_const_type [N] ;
222 template<
class T,
class Layout ,
unsigned N >
223 struct AnalyzeStokhosShape< const T[N], Layout >
224 :
public ShapeInsert< typename AnalyzeStokhosShape< const T, Layout >::shape , N >::type
227 typedef AnalyzeStokhosShape< const T, Layout > nested ;
230 typedef typename nested::specialize specialize ;
232 typedef typename ShapeInsert< typename nested::shape , N >::type shape ;
234 typedef typename nested::array_intrinsic_type array_intrinsic_type [N] ;
235 typedef typename nested::flat_array_type flat_array_type [N] ;
237 typedef typename nested::type type [N] ;
239 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type [N] ;
240 typedef typename nested::const_flat_array_type const_flat_array_type [N] ;
241 typedef typename nested::const_value_type const_value_type ;
242 typedef typename nested::const_type const_type [N] ;
244 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type [N] ;
245 typedef typename nested::non_const_flat_array_type non_const_flat_array_type [N] ;
246 typedef typename nested::non_const_value_type non_const_value_type ;
247 typedef typename nested::non_const_type non_const_type [N] ;