DPC++ Runtime
Runtime libraries for oneAPI DPC++
generic_type_lists.hpp
Go to the documentation of this file.
1 //==-------- generic_type_lists.hpp - SYCL Generic type lists --------------==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
11 #include <sycl/access/access.hpp>
14 
15 #include <cstddef>
16 
17 // Generic type name description, which serves as a description for all valid
18 // types of parameters to kernel functions
19 
20 // Forward declarations
21 namespace sycl {
23 template <typename T, int N> class vec;
24 template <typename Type, std::size_t NumElements> class marray;
25 namespace detail {
26 namespace half_impl {
27 class half;
28 }
29 } // namespace detail
31 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
32 } // namespace sycl
33 
34 namespace sycl {
36 namespace detail {
37 namespace gtl {
38 // floating point types
40 
43 
44 using marray_half_list =
47 
48 using half_list =
50 
52 
53 using vector_float_list =
56 
57 using marray_float_list =
60 
61 using float_list =
63 
65 
66 using vector_double_list =
69 
70 using marray_double_list =
73 
74 using double_list =
76 
79 
82 
85 
86 using floating_list =
88 
89 // geometric floating point types
91 
93 
95 
98 
101 
104 
106 
108 
109 using geo_double_list =
111 
114 
117 
119 
120 // cross floating point types
122 
124 
126 
127 using cross_floating_list =
129 
131 
135 
139 
140 using default_char_list =
143 
145 
149 
154 
155 using signed_char_list =
158 
160 
165 
170 
171 using unsigned_char_list =
174 
175 using scalar_char_list =
178 
179 using vector_char_list =
182 
183 using marray_char_list =
186 
188 
189 // short int types
191 
196 
201 
202 using signed_short_list =
205 
207 
212 
217 
218 using unsigned_short_list =
221 
222 using scalar_short_list =
224 
225 using vector_short_list =
228 
230 
231 // int types
233 
237 
242 
243 using signed_int_list =
246 
248 
253 
258 
259 using unsigned_int_list =
262 
263 using scalar_int_list =
265 
266 using vector_int_list =
268 
269 using marray_int_list =
271 
273 
274 // long types
276 
280 
285 
286 using signed_long_list =
289 
291 
296 
301 
302 using unsigned_long_list =
305 
306 using scalar_long_list =
308 
309 using vector_long_list =
311 
312 using marray_long_list =
314 
315 using long_list =
317 
318 // long long types
320 
325 
330 
331 using signed_longlong_list =
334 
336 
341 
346 
350 
351 using scalar_longlong_list =
353 
354 using vector_longlong_list =
356 
357 using marray_longlong_list =
359 
360 using longlong_list =
362 
363 // long integer types
366 
369 
372 
376 
379 
382 
385 
389 
392 
395 
398 
399 using long_integer_list =
402 
403 #if __cplusplus >= 201703L && (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0)
404 // std::byte
405 using scalar_byte_list = type_list<std::byte>;
406 
407 using vector_byte_list =
410 
411 using marray_byte_list = type_list<marray<std::byte, 1>, marray<std::byte, 2>,
414 #endif
415 
416 // integer types
423 
430 
437 
438 using signed_integer_list =
441 
449 #if __cplusplus >= 201703L && (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0)
450  ,
451  scalar_byte_list
452 #endif
453  >;
454 
462 #if __cplusplus >= 201703L && (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0)
463  ,
464  vector_byte_list
465 #endif
466  >;
467 
475 #if __cplusplus >= 201703L && (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0)
476  ,
477  marray_byte_list
478 #endif
479  >;
480 
481 using unsigned_integer_list =
484 
485 using scalar_integer_list =
487 
488 using vector_integer_list =
490 
491 using marray_integer_list =
493 
494 using integer_list =
496 
497 // basic types
500 
503 
506 
507 using signed_basic_list =
510 
512 
514 
516 
517 using unsigned_basic_list =
520 
521 using scalar_basic_list =
523 
524 using vector_basic_list =
526 
527 using marray_basic_list =
529 
530 using basic_list =
532 
533 // nan builtin types
536 } // namespace gtl
537 namespace gvl {
538 // address spaces
540  access::address_space::local_space, access::address_space::global_space,
541  access::address_space::private_space, access::address_space::constant_space,
542  access::address_space::ext_intel_global_device_space,
543  access::address_space::ext_intel_global_host_space>;
544 
546  address_space_list<access::address_space::local_space,
547  access::address_space::global_space,
548  access::address_space::private_space,
549  access::address_space::ext_intel_global_device_space,
550  access::address_space::ext_intel_global_host_space>;
551 
553  address_space_list<access::address_space::global_space,
554  access::address_space::private_space,
555  access::address_space::constant_space,
556  access::address_space::ext_intel_global_device_space,
557  access::address_space::ext_intel_global_host_space>;
558 } // namespace gvl
559 } // namespace detail
560 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
561 } // namespace sycl
sycl::_V1::detail::gtl::vector_default_char_list
type_list< vec< char, 1 >, vec< char, 2 >, vec< char, 3 >, vec< char, 4 >, vec< char, 8 >, vec< char, 16 > > vector_default_char_list
Definition: generic_type_lists.hpp:134
sycl::_V1::detail::gtl::scalar_signed_integer_list
type_list< conditional_t< std::is_signed< char >::value, type_list< scalar_default_char_list, scalar_signed_char_list >, scalar_signed_char_list >, scalar_signed_short_list, scalar_signed_int_list, scalar_signed_long_list, scalar_signed_longlong_list > scalar_signed_integer_list
Definition: generic_type_lists.hpp:422
sycl::_V1::detail::gtl::vector_unsigned_int_list
type_list< vec< unsigned int, 1 >, vec< unsigned int, 2 >, vec< unsigned int, 3 >, vec< unsigned int, 4 >, vec< unsigned int, 8 >, vec< unsigned int, 16 > > vector_unsigned_int_list
Definition: generic_type_lists.hpp:252
sycl::_V1::detail::gtl::scalar_unsigned_long_integer_list
type_list< scalar_unsigned_long_list, scalar_unsigned_longlong_list > scalar_unsigned_long_integer_list
Definition: generic_type_lists.hpp:378
sycl::_V1::detail::gtl::scalar_unsigned_basic_list
type_list< scalar_unsigned_integer_list > scalar_unsigned_basic_list
Definition: generic_type_lists.hpp:511
sycl::_V1::detail::gtl::marray_signed_int_list
type_list< marray< signed int, 1 >, marray< signed int, 2 >, marray< signed int, 3 >, marray< signed int, 4 >, marray< signed int, 8 >, marray< signed int, 16 > > marray_signed_int_list
Definition: generic_type_lists.hpp:241
sycl::_V1::detail::gtl::vector_geo_float_list
type_list< vec< float, 1 >, vec< float, 2 >, vec< float, 3 >, vec< float, 4 > > vector_geo_float_list
Definition: generic_type_lists.hpp:100
__SYCL_INLINE_VER_NAMESPACE
#define __SYCL_INLINE_VER_NAMESPACE(X)
Definition: defines_elementary.hpp:13
sycl::_V1::detail::gtl::vector_long_integer_list
type_list< vector_signed_long_integer_list, vector_unsigned_long_integer_list > vector_long_integer_list
Definition: generic_type_lists.hpp:394
sycl::_V1::detail::gtl::marray_default_char_list
type_list< marray< char, 1 >, marray< char, 2 >, marray< char, 3 >, marray< char, 4 >, marray< char, 8 >, marray< char, 16 > > marray_default_char_list
Definition: generic_type_lists.hpp:138
sycl
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:13
access.hpp
sycl::_V1::detail::gtl::scalar_signed_short_list
type_list< signed short > scalar_signed_short_list
Definition: generic_type_lists.hpp:190
sycl::_V1::detail::gtl::vector_signed_long_integer_list
type_list< vector_signed_long_list, vector_signed_longlong_list > vector_signed_long_integer_list
Definition: generic_type_lists.hpp:368
sycl::_V1::detail::gtl::scalar_long_integer_list
type_list< scalar_signed_long_integer_list, scalar_unsigned_long_integer_list > scalar_long_integer_list
Definition: generic_type_lists.hpp:391
sycl::_V1::detail::gtl::scalar_signed_basic_list
type_list< scalar_floating_list, scalar_signed_integer_list > scalar_signed_basic_list
Definition: generic_type_lists.hpp:499
stl_type_traits.hpp
sycl::_V1::detail::gtl::scalar_default_char_list
type_list< char > scalar_default_char_list
Definition: generic_type_lists.hpp:130
sycl::_V1::detail::gtl::vector_signed_long_list
type_list< vec< signed long, 1 >, vec< signed long, 2 >, vec< signed long, 3 >, vec< signed long, 4 >, vec< signed long, 8 >, vec< signed long, 16 > > vector_signed_long_list
Definition: generic_type_lists.hpp:279
sycl::_V1::detail::gtl::vector_signed_longlong_list
type_list< vec< signed long long, 1 >, vec< signed long long, 2 >, vec< signed long long, 3 >, vec< signed long long, 4 >, vec< signed long long, 8 >, vec< signed long long, 16 > > vector_signed_longlong_list
Definition: generic_type_lists.hpp:324
sycl::_V1::detail::gtl::vector_unsigned_integer_list
type_list< conditional_t< std::is_unsigned< char >::value, type_list< vector_default_char_list, vector_unsigned_char_list >, vector_unsigned_char_list >, vector_unsigned_short_list, vector_unsigned_int_list, vector_unsigned_long_list, vector_unsigned_longlong_list > vector_unsigned_integer_list
Definition: generic_type_lists.hpp:466
sycl::_V1::detail::gtl::marray_unsigned_short_list
type_list< marray< unsigned short, 1 >, marray< unsigned short, 2 >, marray< unsigned short, 3 >, marray< unsigned short, 4 >, marray< unsigned short, 8 >, marray< unsigned short, 16 > > marray_unsigned_short_list
Definition: generic_type_lists.hpp:216
sycl::_V1::detail::gtl::scalar_signed_long_integer_list
type_list< scalar_signed_long_list, scalar_signed_longlong_list > scalar_signed_long_integer_list
Definition: generic_type_lists.hpp:365
sycl::_V1::marray
Provides a cross-patform math array class template that works on SYCL devices as well as in host C++ ...
Definition: generic_type_lists.hpp:24
sycl::_V1::detail::gtl::scalar_geo_float_list
type_list< float > scalar_geo_float_list
Definition: generic_type_lists.hpp:92
sycl::_V1::detail::gtl::scalar_unsigned_char_list
type_list< unsigned char > scalar_unsigned_char_list
Definition: generic_type_lists.hpp:159
sycl::_V1::detail::gtl::vector_unsigned_long_integer_list
type_list< vector_unsigned_long_list, vector_unsigned_longlong_list > vector_unsigned_long_integer_list
Definition: generic_type_lists.hpp:381
sycl::_V1::detail::gtl::scalar_signed_longlong_list
type_list< signed long long > scalar_signed_longlong_list
Definition: generic_type_lists.hpp:319
sycl::_V1::detail::gtl::marray_signed_long_integer_list
type_list< marray_signed_long_list, marray_signed_longlong_list > marray_signed_long_integer_list
Definition: generic_type_lists.hpp:371
sycl::_V1::detail::gtl::marray_signed_short_list
type_list< marray< signed short, 1 >, marray< signed short, 2 >, marray< signed short, 3 >, marray< signed short, 4 >, marray< signed short, 8 >, marray< signed short, 16 > > marray_signed_short_list
Definition: generic_type_lists.hpp:200
sycl::_V1::detail::gtl::vector_unsigned_short_list
type_list< vec< unsigned short, 1 >, vec< unsigned short, 2 >, vec< unsigned short, 3 >, vec< unsigned short, 4 >, vec< unsigned short, 8 >, vec< unsigned short, 16 > > vector_unsigned_short_list
Definition: generic_type_lists.hpp:211
sycl::_V1::detail::gtl::vector_unsigned_longlong_list
type_list< vec< unsigned long long, 1 >, vec< unsigned long long, 2 >, vec< unsigned long long, 3 >, vec< unsigned long long, 4 >, vec< unsigned long long, 8 >, vec< unsigned long long, 16 > > vector_unsigned_longlong_list
Definition: generic_type_lists.hpp:340
sycl::_V1::half
sycl::detail::half_impl::half half
Definition: aliases.hpp:77
sycl::_V1::detail::gtl::unsigned_int_list
type_list< scalar_unsigned_int_list, vector_unsigned_int_list, marray_unsigned_int_list > unsigned_int_list
Definition: generic_type_lists.hpp:261
sycl::_V1::detail::gtl::unsigned_short_list
type_list< scalar_unsigned_short_list, vector_unsigned_short_list, marray_unsigned_short_list > unsigned_short_list
Definition: generic_type_lists.hpp:220
sycl::_V1::detail::gtl::vector_signed_char_list
type_list< vec< signed char, 1 >, vec< signed char, 2 >, vec< signed char, 3 >, vec< signed char, 4 >, vec< signed char, 8 >, vec< signed char, 16 > > vector_signed_char_list
Definition: generic_type_lists.hpp:148
sycl::_V1::detail::type_list
Definition: type_list.hpp:23
sycl::_V1::detail::gtl::scalar_signed_int_list
type_list< signed int > scalar_signed_int_list
Definition: generic_type_lists.hpp:232
sycl::_V1::detail::value_list
Definition: type_list.hpp:62
sycl::_V1::detail::gtl::scalar_unsigned_long_list
type_list< unsigned long > scalar_unsigned_long_list
Definition: generic_type_lists.hpp:290
sycl::_V1::vec
Provides a cross-patform vector class template that works efficiently on SYCL devices as well as in h...
Definition: aliases.hpp:19
sycl::_V1::detail::gtl::vector_signed_integer_list
type_list< conditional_t< std::is_signed< char >::value, type_list< vector_default_char_list, vector_signed_char_list >, vector_signed_char_list >, vector_signed_short_list, vector_signed_int_list, vector_signed_long_list, vector_signed_longlong_list > vector_signed_integer_list
Definition: generic_type_lists.hpp:429
sycl::_V1::detail::gtl::scalar_unsigned_short_list
type_list< unsigned short > scalar_unsigned_short_list
Definition: generic_type_lists.hpp:206
sycl::_V1::detail::gtl::scalar_unsigned_int_list
type_list< unsigned int > scalar_unsigned_int_list
Definition: generic_type_lists.hpp:247
sycl::_V1::detail::gtl::scalar_signed_char_list
type_list< signed char > scalar_signed_char_list
Definition: generic_type_lists.hpp:144
sycl::_V1::detail::gtl::vector_unsigned_long_list
type_list< vec< unsigned long, 1 >, vec< unsigned long, 2 >, vec< unsigned long, 3 >, vec< unsigned long, 4 >, vec< unsigned long, 8 >, vec< unsigned long, 16 > > vector_unsigned_long_list
Definition: generic_type_lists.hpp:295
sycl::_V1::detail::gtl::scalar_signed_long_list
type_list< signed long > scalar_signed_long_list
Definition: generic_type_lists.hpp:275
sycl::_V1::detail::gtl::vector_unsigned_char_list
type_list< vec< unsigned char, 1 >, vec< unsigned char, 2 >, vec< unsigned char, 3 >, vec< unsigned char, 4 >, vec< unsigned char, 8 >, vec< unsigned char, 16 > > vector_unsigned_char_list
Definition: generic_type_lists.hpp:164
sycl::_V1::detail::gtl::scalar_unsigned_longlong_list
type_list< unsigned long long > scalar_unsigned_longlong_list
Definition: generic_type_lists.hpp:335
sycl::_V1::detail::conditional_t
typename std::conditional< B, T, F >::type conditional_t
Definition: stl_type_traits.hpp:27
sycl::_V1::detail::gtl::marray_signed_char_list
type_list< marray< signed char, 1 >, marray< signed char, 2 >, marray< signed char, 3 >, marray< signed char, 4 >, marray< signed char, 8 >, marray< signed char, 16 > > marray_signed_char_list
Definition: generic_type_lists.hpp:153
sycl::_V1::detail::gtl::scalar_geo_half_list
type_list< half > scalar_geo_half_list
Definition: generic_type_lists.hpp:90
sycl::_V1::detail::gtl::marray_unsigned_int_list
type_list< marray< unsigned int, 1 >, marray< unsigned int, 2 >, marray< unsigned int, 3 >, marray< unsigned int, 4 >, marray< unsigned int, 8 >, marray< unsigned int, 16 > > marray_unsigned_int_list
Definition: generic_type_lists.hpp:257
sycl::_V1::detail::gtl::vector_signed_int_list
type_list< vec< signed int, 1 >, vec< signed int, 2 >, vec< signed int, 3 >, vec< signed int, 4 >, vec< signed int, 8 >, vec< signed int, 16 > > vector_signed_int_list
Definition: generic_type_lists.hpp:236
sycl::_V1::detail::gtl::vector_signed_short_list
type_list< vec< signed short, 1 >, vec< signed short, 2 >, vec< signed short, 3 >, vec< signed short, 4 >, vec< signed short, 8 >, vec< signed short, 16 > > vector_signed_short_list
Definition: generic_type_lists.hpp:195
sycl::_V1::detail::gtl::vector_unsigned_basic_list
type_list< vector_unsigned_integer_list > vector_unsigned_basic_list
Definition: generic_type_lists.hpp:513
sycl::_V1::detail::gtl::vector_geo_half_list
type_list< vec< half, 1 >, vec< half, 2 >, vec< half, 3 >, vec< half, 4 > > vector_geo_half_list
Definition: generic_type_lists.hpp:97
sycl::_V1::detail::gtl::vector_signed_basic_list
type_list< vector_floating_list, vector_signed_integer_list > vector_signed_basic_list
Definition: generic_type_lists.hpp:502
type_list.hpp
sycl::_V1::detail::gtl::scalar_unsigned_integer_list
type_list< conditional_t< std::is_unsigned< char >::value, type_list< scalar_default_char_list, scalar_unsigned_char_list >, scalar_unsigned_char_list >, scalar_unsigned_short_list, scalar_unsigned_int_list, scalar_unsigned_long_list, scalar_unsigned_longlong_list > scalar_unsigned_integer_list
Definition: generic_type_lists.hpp:453
sycl::_V1::detail::gtl::marray_signed_long_list
type_list< marray< signed long, 1 >, marray< signed long, 2 >, marray< signed long, 3 >, marray< signed long, 4 >, marray< signed long, 8 >, marray< signed long, 16 > > marray_signed_long_list
Definition: generic_type_lists.hpp:284
sycl::_V1::detail::gtl::marray_unsigned_long_list
type_list< marray< unsigned long, 1 >, marray< unsigned long, 2 >, marray< unsigned long, 3 >, marray< unsigned long, 4 >, marray< unsigned long, 8 >, marray< unsigned long, 16 > > marray_unsigned_long_list
Definition: generic_type_lists.hpp:300