42 #ifndef KOKKOS_ANALYZE_STOKHOS_SHAPE_HPP
43 #define KOKKOS_ANALYZE_STOKHOS_SHAPE_HPP
71 template<
class T,
class Layout >
72 struct AnalyzeStokhosShape :
public Shape< sizeof(T) , 0 >
74 typedef void specialize ;
76 typedef Shape< sizeof(T), 0 > shape ;
78 typedef T array_intrinsic_type ;
79 typedef T flat_array_type ;
82 typedef const T const_array_intrinsic_type ;
83 typedef const T const_flat_array_type ;
84 typedef const T const_value_type ;
85 typedef const T const_type ;
86 typedef T non_const_array_intrinsic_type ;
87 typedef T non_const_flat_array_type ;
88 typedef T non_const_value_type ;
89 typedef T non_const_type ;
92 template<
class Layout>
93 struct AnalyzeStokhosShape<void, Layout> :
public Shape< 0 , 0 >
95 typedef void specialize ;
97 typedef Shape< 0 , 0 > shape ;
99 typedef void array_intrinsic_type ;
100 typedef void flat_array_type ;
103 typedef const void const_array_intrinsic_type ;
104 typedef const void const_flat_array_type ;
105 typedef const void const_value_type ;
106 typedef const void const_type ;
107 typedef void non_const_array_intrinsic_type ;
108 typedef void non_const_flat_array_type ;
109 typedef void non_const_value_type ;
110 typedef void non_const_type ;
113 template<
class T,
class Layout >
114 struct AnalyzeStokhosShape< const T, Layout > :
115 public AnalyzeStokhosShape<T, Layout>::shape
118 typedef AnalyzeStokhosShape<T, Layout> nested ;
121 typedef typename nested::specialize specialize ;
123 typedef typename nested::shape shape ;
125 typedef typename nested::const_array_intrinsic_type array_intrinsic_type ;
126 typedef typename nested::const_flat_array_type flat_array_type ;
127 typedef typename nested::const_value_type
value_type ;
128 typedef typename nested::const_type type ;
130 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type ;
131 typedef typename nested::const_flat_array_type const_flat_array_type ;
132 typedef typename nested::const_value_type const_value_type ;
133 typedef typename nested::const_type const_type ;
135 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type ;
136 typedef typename nested::non_const_flat_array_type non_const_flat_array_type ;
137 typedef typename nested::non_const_value_type non_const_value_type ;
138 typedef typename nested::non_const_type non_const_type ;
141 template<
class T,
class Layout >
142 struct AnalyzeStokhosShape< T *, Layout >
143 :
public ShapeInsert< typename AnalyzeStokhosShape<T,Layout>::shape , 0 >::type
146 typedef AnalyzeStokhosShape<T, Layout> nested ;
149 typedef typename nested::specialize specialize ;
151 typedef typename ShapeInsert< typename nested::shape , 0 >::type shape ;
153 typedef typename nested::array_intrinsic_type * array_intrinsic_type ;
154 typedef typename nested::flat_array_type * flat_array_type ;
156 typedef typename nested::type * type ;
158 typedef typename nested::const_array_intrinsic_type * const_array_intrinsic_type ;
159 typedef typename nested::const_flat_array_type * const_flat_array_type ;
160 typedef typename nested::const_value_type const_value_type ;
161 typedef typename nested::const_type * const_type ;
163 typedef typename nested::non_const_array_intrinsic_type * non_const_array_intrinsic_type ;
164 typedef typename nested::non_const_flat_array_type * non_const_flat_array_type ;
165 typedef typename nested::non_const_value_type non_const_value_type ;
166 typedef typename nested::non_const_type * non_const_type ;
169 template<
class T,
class Layout >
170 struct AnalyzeStokhosShape< T[], Layout >
171 :
public ShapeInsert< typename AnalyzeStokhosShape<T, Layout>::shape , 0 >::type
174 typedef AnalyzeStokhosShape<T, Layout> nested ;
177 typedef typename nested::specialize specialize ;
179 typedef typename ShapeInsert< typename nested::shape , 0 >::type shape ;
181 typedef typename nested::array_intrinsic_type array_intrinsic_type [] ;
182 typedef typename nested::flat_array_type flat_array_type [] ;
184 typedef typename nested::type type [] ;
186 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type [] ;
187 typedef typename nested::const_flat_array_type const_flat_array_type [] ;
188 typedef typename nested::const_value_type const_value_type ;
189 typedef typename nested::const_type const_type [] ;
191 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type [] ;
192 typedef typename nested::non_const_flat_array_type non_const_flat_array_type [] ;
193 typedef typename nested::non_const_value_type non_const_value_type ;
194 typedef typename nested::non_const_type non_const_type [] ;
197 template<
class T,
class Layout >
198 struct AnalyzeStokhosShape< const T[], Layout >
199 :
public ShapeInsert< typename AnalyzeStokhosShape< const T, Layout >::shape , 0 >::type
202 typedef AnalyzeStokhosShape< const T, Layout > nested ;
205 typedef typename nested::specialize specialize ;
207 typedef typename ShapeInsert< typename nested::shape , 0 >::type shape ;
209 typedef typename nested::array_intrinsic_type array_intrinsic_type [] ;
210 typedef typename nested::flat_array_type flat_array_type [] ;
212 typedef typename nested::type type [] ;
214 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type [] ;
215 typedef typename nested::const_flat_array_type const_flat_array_type [] ;
216 typedef typename nested::const_value_type const_value_type ;
217 typedef typename nested::const_type const_type [] ;
219 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type [] ;
220 typedef typename nested::non_const_flat_array_type non_const_flat_array_type [] ;
221 typedef typename nested::non_const_value_type non_const_value_type ;
222 typedef typename nested::non_const_type non_const_type [] ;
225 template<
class T,
class Layout ,
unsigned N >
226 struct AnalyzeStokhosShape< T[N], Layout >
227 :
public ShapeInsert< typename AnalyzeStokhosShape<T, Layout>::shape , N >::type
230 typedef AnalyzeStokhosShape<T, Layout> nested ;
233 typedef typename nested::specialize specialize ;
235 typedef typename ShapeInsert< typename nested::shape , N >::type shape ;
237 typedef typename nested::array_intrinsic_type array_intrinsic_type [N] ;
238 typedef typename nested::flat_array_type flat_array_type [N] ;
240 typedef typename nested::type type [N] ;
242 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type [N] ;
243 typedef typename nested::const_flat_array_type const_flat_array_type [N] ;
244 typedef typename nested::const_value_type const_value_type ;
245 typedef typename nested::const_type const_type [N] ;
247 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type [N] ;
248 typedef typename nested::non_const_flat_array_type non_const_flat_array_type [N] ;
249 typedef typename nested::non_const_value_type non_const_value_type ;
250 typedef typename nested::non_const_type non_const_type [N] ;
253 template<
class T,
class Layout ,
unsigned N >
254 struct AnalyzeStokhosShape< const T[N], Layout >
255 :
public ShapeInsert< typename AnalyzeStokhosShape< const T, Layout >::shape , N >::type
258 typedef AnalyzeStokhosShape< const T, Layout > nested ;
261 typedef typename nested::specialize specialize ;
263 typedef typename ShapeInsert< typename nested::shape , N >::type shape ;
265 typedef typename nested::array_intrinsic_type array_intrinsic_type [N] ;
266 typedef typename nested::flat_array_type flat_array_type [N] ;
268 typedef typename nested::type type [N] ;
270 typedef typename nested::const_array_intrinsic_type const_array_intrinsic_type [N] ;
271 typedef typename nested::const_flat_array_type const_flat_array_type [N] ;
272 typedef typename nested::const_value_type const_value_type ;
273 typedef typename nested::const_type const_type [N] ;
275 typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type [N] ;
276 typedef typename nested::non_const_flat_array_type non_const_flat_array_type [N] ;
277 typedef typename nested::non_const_value_type non_const_value_type ;
278 typedef typename nested::non_const_type non_const_type [N] ;