DPC++ Runtime
Runtime libraries for oneAPI DPC++
generic_type_traits.hpp
Go to the documentation of this file.
1 //==----------- generic_type_traits - SYCL type traits ---------------------==//
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>
12 #include <sycl/aliases.hpp>
13 #include <sycl/detail/common.hpp>
16 #include <sycl/half_type.hpp>
17 #include <sycl/multi_ptr.hpp>
18 
19 #include <limits>
20 
21 namespace sycl {
23 namespace detail {
24 
25 template <typename T> using is_floatn = is_contained<T, gtl::vector_float_list>;
26 
27 template <typename T> using is_genfloatf = is_contained<T, gtl::float_list>;
28 
29 template <typename T>
31 
32 template <typename T>
34 
35 template <typename T> using is_genfloatd = is_contained<T, gtl::double_list>;
36 
37 template <typename T>
39 
40 template <typename T> using is_halfn = is_contained<T, gtl::vector_half_list>;
41 
42 template <typename T> using is_genfloath = is_contained<T, gtl::half_list>;
43 
44 template <typename T>
46 
47 template <typename T> using is_genfloat = is_contained<T, gtl::floating_list>;
48 
49 template <typename T>
51 
52 template <typename T>
54 
55 template <typename T>
57 
58 template <typename T>
60 
61 template <typename T>
63 
64 template <typename T> using is_gengeohalf = is_contained<T, gtl::geo_half_list>;
65 
66 template <typename T>
68 
69 template <typename T>
71 
72 template <typename T>
74 
75 template <typename T> using is_sgengeo = is_contained<T, gtl::scalar_geo_list>;
76 
77 template <typename T> using is_vgengeo = is_contained<T, gtl::vector_geo_list>;
78 
79 template <typename T>
81 
82 template <typename T>
84 
85 template <typename T>
87 
88 template <typename T>
90 
91 template <typename T>
93 
94 template <typename T>
96 
97 template <typename T>
99 
100 template <typename T>
102 
103 template <typename T>
105 
106 template <typename T> using is_genchar = is_contained<T, gtl::char_list>;
107 
108 template <typename T>
110 
111 template <typename T>
113 
114 template <typename T>
116 
117 template <typename T>
119 
120 template <typename T>
122 
123 template <typename T>
125 
126 template <typename T>
128 
129 template <typename T> using is_genint = is_contained<T, gtl::signed_int_list>;
130 
131 template <typename T>
133 
134 template <typename T>
136 
137 template <typename T>
139 
141 
142 template <typename T>
144 
145 template <typename T>
147 
148 template <typename T>
150 
151 template <typename T>
153 
154 template <typename T>
156 
157 template <typename T>
159 
160 template <typename T> using is_geninteger = is_contained<T, gtl::integer_list>;
161 
162 template <typename T>
164 
165 template <typename T>
167 
168 template <typename T>
170 
171 template <typename T>
173 
174 template <typename T>
176 
177 template <typename T>
179 
180 template <typename T>
182 
183 template <typename T>
185 
186 template <typename T> using is_gentype = is_contained<T, gtl::basic_list>;
187 
188 template <typename T>
190 
191 template <typename T>
193 
194 template <typename T>
196 
197 template <typename T>
199 
200 template <typename T>
202 
203 template <typename T>
205 
206 template <typename T>
208 
209 template <typename T>
211 
212 template <typename T>
214 
215 template <typename T>
217 
218 template <typename T>
220 
221 template <typename T>
223 
224 template <typename T>
226 
227 template <typename T>
229 
230 template <typename T>
234 
235 template <typename T>
239 
240 template <typename T>
244 
245 template <typename T> using is_nan_type = is_contained<T, gtl::nan_list>;
246 
247 // nan_types
248 template <typename T, typename Enable = void> struct nan_types;
249 
250 template <typename T>
251 struct nan_types<
252  T, std::enable_if_t<is_contained<T, gtl::unsigned_short_list>::value, T>> {
255 };
256 
257 template <typename T>
258 struct nan_types<
259  T, std::enable_if_t<is_contained<T, gtl::unsigned_int_list>::value, T>> {
262 };
263 
264 template <typename T>
265 struct nan_types<
266  T, std::enable_if_t<is_contained<T, gtl::unsigned_long_integer_list>::value,
267  T>> {
269  using arg_type =
271 };
272 
273 template <typename T> using nan_return_t = typename nan_types<T, T>::ret_type;
274 
275 template <typename T>
277 
278 template <typename T>
280 
281 template <typename T>
283 
284 template <typename T>
287 
288 template <typename T, typename B, typename Enable = void>
290 
291 template <typename T, typename B>
293  std::enable_if_t<is_sgentype<T>::value, T>> {
294  B operator()(T t) { return static_cast<B>(t); }
295 };
296 
297 template <typename T, typename B>
299  std::enable_if_t<is_vgentype<T>::value, T>> {
300  vec<B, T::size()> operator()(T t) { return t.template convert<B>(); }
301 };
302 
303 template <typename T, typename B>
305 
306 // Try to get pointer_t (legacy) or pointer, otherwise T
307 template <typename T> class TryToGetPointerT {
308  static T check(...);
309  template <typename A> static typename A::pointer_t check(const A &);
310  template <typename A> static typename A::pointer check(const A &);
311 
312 public:
313  using type = decltype(check(T()));
314  static constexpr bool value =
315  std::is_pointer<T>::value || !std::is_same<T, type>::value;
316 };
317 
318 // Try to get element_type or value_type, otherwise T
319 template <typename T> class TryToGetElementType {
320  static T check(...);
321  template <typename A> static typename A::element_type check(const A &);
322  template <typename A> static typename A::value_type check(const A &);
323 
324 public:
325  using type = decltype(check(T()));
326  static constexpr bool value = !std::is_same<T, type>::value;
327 };
328 
329 // Try to get vector_t, otherwise T
330 template <typename T> class TryToGetVectorT {
331  static T check(...);
332  template <typename A> static typename A::vector_t check(const A &);
333 
334 public:
335  using type = decltype(check(T()));
336  static constexpr bool value = !std::is_same<T, type>::value;
337 };
338 
339 // Try to get pointer_t (if pointer_t indicates on the type with_remainder
340 // vector_t creates a pointer type on vector_t), otherwise T
341 template <typename T> class TryToGetPointerVecT {
342  static T check(...);
343  template <typename A>
344  static typename DecoratedType<
347  check(const A &);
348  template <typename A>
349  static typename TryToGetVectorT<A>::type *check(const A *);
350 
351 public:
352  using type = decltype(check(T()));
353 };
354 
355 template <typename To> struct PointerConverter {
356  template <typename From> static To Convert(From *t) {
357  return reinterpret_cast<To>(t);
358  }
359 
360  template <typename From> static To Convert(From &t) {
361  // TODO find the better way to get the pointer to underlying data from vec
362  // class
363  return reinterpret_cast<To>(t.get());
364  }
365 };
366 
367 template <typename ElementType, access::address_space Space,
368  access::decorated DecorateAddress>
369 struct PointerConverter<multi_ptr<ElementType, Space, DecorateAddress>> {
370  template <typename From>
372  return address_space_cast<Space, DecorateAddress>(
373  reinterpret_cast<remove_decoration_t<From *>>(t));
374  }
375 
376  template <typename From>
378  return address_space_cast<Space, DecorateAddress>(
379  reinterpret_cast<remove_decoration_t<decltype(t.get())>>(t.get()));
380  }
381 
382  template <typename From>
385  return t;
386  }
387 };
388 
389 template <typename To, typename From,
390  typename = typename std::enable_if_t<TryToGetPointerT<From>::value>>
391 To ConvertNonVectorType(From &t) {
393 }
394 
395 template <typename To, typename From> To ConvertNonVectorType(From *t) {
397 }
398 
399 template <typename To, typename From>
400 typename std::enable_if_t<!TryToGetPointerT<From>::value, To>
402  return static_cast<To>(t);
403 }
404 
405 template <typename T, typename = void> struct mptr_or_vec_elem_type {
406  using type = typename T::element_type;
407 };
408 template <typename ElementType, access::address_space Space,
409  access::decorated IsDecorated>
411  multi_ptr<ElementType, Space, IsDecorated>,
412  std::enable_if_t<IsDecorated == access::decorated::no ||
413  IsDecorated == access::decorated::yes>> {
415 };
416 template <typename ElementType, access::address_space Space,
417  access::decorated IsDecorated>
418 struct mptr_or_vec_elem_type<const multi_ptr<ElementType, Space, IsDecorated>>
419  : mptr_or_vec_elem_type<multi_ptr<ElementType, Space, IsDecorated>> {};
420 
421 template <typename T>
423 
424 // select_apply_cl_scalar_t selects from T8/T16/T32/T64 basing on
425 // sizeof(IN). expected to handle scalar types.
426 template <typename T, typename T8, typename T16, typename T32, typename T64>
428  conditional_t<sizeof(T) == 1, T8,
429  conditional_t<sizeof(T) == 2, T16,
430  conditional_t<sizeof(T) == 4, T32, T64>>>;
431 
432 // Shortcuts for selecting scalar int/unsigned int/fp type.
433 template <typename T>
436  sycl::cl_long>;
437 
438 template <typename T>
442 
443 template <typename T>
447 
448 template <typename T>
453 
454 // select_cl_scalar_t picks corresponding cl_* type for input
455 // scalar T or returns T if T is not scalar.
456 template <typename T>
458  std::is_integral<T>::value, select_cl_scalar_integral_t<T>,
460  std::is_floating_point<T>::value, select_cl_scalar_float_t<T>,
461  // half is a special case: it is implemented differently on host and
462  // device and therefore, might lower to different types
465 
466 // select_cl_vector_or_scalar_or_ptr does cl_* type selection for element type
467 // of a vector type T, pointer type substitution, and scalar type substitution.
468 // If T is not vector, scalar, or pointer unmodified T is returned.
469 template <typename T, typename Enable = void>
471 
472 template <typename T>
474  T, typename std::enable_if_t<is_vgentype<T>::value>> {
475  using type =
476  // select_cl_scalar_t returns _Float16, so, we try to instantiate vec
477  // class with _Float16 DataType, which is not expected there
478  // So, leave vector<half, N> as-is
482  T::size()>;
483 };
484 
485 template <typename T>
487  T, typename std::enable_if_t<!is_vgentype<T>::value &&
488  !std::is_pointer<T>::value>> {
490 };
491 
492 template <typename T>
494  T, typename std::enable_if_t<!is_vgentype<T>::value &&
495  std::is_pointer<T>::value>> {
497  std::remove_pointer_t<T>>::type *;
498 #ifdef __SYCL_DEVICE_ONLY__
500 #else
502 #endif
503 };
504 
505 // select_cl_mptr_or_vector_or_scalar_or_ptr does cl_* type selection for type
506 // pointed by multi_ptr, for raw pointers, for element type of a vector type T,
507 // and does scalar type substitution. If T is not mutlti_ptr or vector or
508 // scalar or pointer unmodified T is returned.
509 template <typename T, typename Enable = void>
511 
512 // this struct helps to use std::uint8_t instead of std::byte,
513 // which is not supported on device
514 template <typename T> struct TypeHelper {
515  using RetType = T;
516 };
517 
518 #if __cplusplus >= 201703L && (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0)
519 template <> struct TypeHelper<std::byte> {
520  using RetType = std::uint8_t;
521 };
522 #endif
523 
524 template <typename T> using type_helper = typename TypeHelper<T>::RetType;
525 
526 template <typename T>
528  T, typename std::enable_if_t<is_genptr<T>::value &&
529  !std::is_pointer<T>::value>> {
532  T::address_space, access::decorated::yes>;
533 };
534 
535 template <typename T>
537  T, typename std::enable_if_t<!is_genptr<T>::value ||
538  std::is_pointer<T>::value>> {
540 };
541 
542 // All types converting shortcut.
543 template <typename T>
546 
547 // Converts T to OpenCL friendly
548 //
549 template <typename T>
557 
558 // convertDataToType() function converts data from FROM type to TO type using
559 // 'as' method for vector type and copy otherwise.
560 template <typename FROM, typename TO>
561 typename std::enable_if_t<is_vgentype<FROM>::value && is_vgentype<TO>::value &&
562  sizeof(TO) == sizeof(FROM),
563  TO>
565  return t.template as<TO>();
566 }
567 
568 template <typename FROM, typename TO>
569 typename std::enable_if_t<!(is_vgentype<FROM>::value &&
570  is_vgentype<TO>::value) &&
571  sizeof(TO) == sizeof(FROM),
572  TO>
574  return ConvertNonVectorType<TO>(t);
575 }
576 
577 // Used for all, any and select relational built-in functions
578 template <typename T> inline constexpr T msbMask(T) {
579  using UT = make_unsigned_t<T>;
580  return T(UT(1) << (sizeof(T) * 8 - 1));
581 }
582 
583 template <typename T> inline constexpr bool msbIsSet(const T x) {
584  return (x & msbMask(x));
585 }
586 
587 #if defined(SYCL2020_CONFORMANT_APIS) && SYCL_LANGUAGE_VERSION >= 202001
588 // SYCL 2020 4.17.9 (Relation functions), e.g. table 178
589 //
590 // genbool isequal (genfloatf x, genfloatf y)
591 // genbool isequal (genfloatd x, genfloatd y)
592 //
593 // TODO: marray support isn't implemented yet.
594 template <typename T>
595 using common_rel_ret_t =
596  conditional_t<is_vgentype<T>::value, make_singed_integer_t<T>, bool>;
597 
598 // TODO: Remove this when common_rel_ret_t is promoted.
599 template <typename T>
601  conditional_t<is_vgentype<T>::value, make_singed_integer_t<T>, int>;
602 #else
603 // SYCL 1.2.1 4.13.7 (Relation functions), e.g.
604 //
605 // igeninteger32bit isequal (genfloatf x, genfloatf y)
606 // igeninteger64bit isequal (genfloatd x, genfloatd y)
607 //
608 // However, we have pre-existing bug so
609 //
610 // igeninteger32bit isequal (genfloatd x, genfloatd y)
611 //
612 // Fixing it would be an ABI-breaking change so isn't done.
613 template <typename T>
616 template <typename T> using internal_host_rel_ret_t = common_rel_ret_t<T>;
617 #endif
618 
619 // forward declaration
620 template <int N> struct Boolean;
621 
622 // Try to get vector element count or 1 otherwise
623 template <typename T, typename Enable = void> struct TryToGetNumElements;
624 
625 template <typename T>
627  T, typename std::enable_if_t<TryToGetVectorT<T>::value>> {
628  static constexpr int value = T::size();
629 };
630 template <typename T>
632  T, typename std::enable_if_t<!TryToGetVectorT<T>::value>> {
633  static constexpr int value = 1;
634 };
635 
636 // Used for relational comparison built-in functions
637 template <typename T> struct RelationalReturnType {
638 #ifdef __SYCL_DEVICE_ONLY__
640 #else
641  // After changing the return type of scalar relational operations to boolean
642  // we keep the old representation of the internal implementation of the
643  // host-side builtins to avoid ABI-breaks.
644  // TODO: Use common_rel_ret_t when ABI break is allowed and the boolean return
645  // type for relationals are promoted out of SYCL2020_CONFORMANT_APIS.
646  // The scalar relational builtins in
647  // sycl/source/detail/builtins_relational.cpp should likewise be updated
648  // to return boolean values.
650 #endif
651 };
652 
653 // Type representing the internal return type of relational builtins.
654 template <typename T>
656 
657 // Used for any and all built-in functions
658 template <typename T> struct RelationalTestForSignBitType {
659 #ifdef __SYCL_DEVICE_ONLY__
662 #else
663  using return_type = int;
664  using argument_type = T;
665 #endif
666 };
667 
668 template <typename T>
671 
672 template <typename T>
675 
676 template <typename T, typename Enable = void> struct RelConverter;
677 
678 template <typename T>
679 struct RelConverter<T,
680  typename std::enable_if_t<TryToGetElementType<T>::value>> {
681  static const int N = T::size();
682 #ifdef __SYCL_DEVICE_ONLY__
683  using bool_t = typename Boolean<N>::vector_t;
684  using ret_t = common_rel_ret_t<T>;
685 #else
688 #endif
689 
690  static ret_t apply(bool_t value) {
691 #ifdef __SYCL_DEVICE_ONLY__
692  typename ret_t::vector_t result(0);
693  for (size_t I = 0; I < N; ++I) {
694  result[I] = value[I];
695  }
696  return result;
697 #else
698  return value;
699 #endif
700  }
701 };
702 
703 template <typename T>
704 struct RelConverter<T,
705  typename std::enable_if_t<!TryToGetElementType<T>::value>> {
707 #ifdef __SYCL_DEVICE_ONLY__
708  using value_t = bool;
709 #else
710  using value_t = R;
711 #endif
712 
713  static R apply(value_t value) { return value; }
714 };
715 
716 template <typename T> static constexpr T max_v() {
717  return (std::numeric_limits<T>::max)();
718 }
719 
720 template <typename T> static constexpr T min_v() {
721  return (std::numeric_limits<T>::min)();
722 }
723 
724 template <typename T> static constexpr T quiet_NaN() {
726 }
727 
728 // is_same_vector_size
729 template <int FirstSize, typename... Args> class is_same_vector_size_impl;
730 
731 template <int FirstSize, typename T, typename... Args>
732 class is_same_vector_size_impl<FirstSize, T, Args...> {
733  using CurrentT = detail::remove_pointer_t<T>;
734  static constexpr int Size = vector_size<CurrentT>::value;
735  static constexpr bool IsSizeEqual = (Size == FirstSize);
736 
737 public:
738  static constexpr bool value =
739  IsSizeEqual ? is_same_vector_size_impl<FirstSize, Args...>::value : false;
740 };
741 
742 template <int FirstSize>
743 class is_same_vector_size_impl<FirstSize> : public std::true_type {};
744 
745 template <typename T, typename... Args> class is_same_vector_size {
746  using CurrentT = remove_pointer_t<T>;
747  static constexpr int Size = vector_size<CurrentT>::value;
748 
749 public:
750  static constexpr bool value = is_same_vector_size_impl<Size, Args...>::value;
751 };
752 
753 // check_vector_size
754 template <typename... Args> inline void check_vector_size() {
756  "The built-in function arguments must [point to|have] types "
757  "with the same number of elements.");
758 }
759 
760 } // namespace detail
761 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
762 } // namespace sycl
Provides constructors for address space qualified and non address space qualified pointers to allow i...
Definition: multi_ptr.hpp:78
ElementType value_type
Definition: multi_ptr.hpp:88
Provides a cross-patform vector class template that works efficiently on SYCL devices as well as in h...
Definition: types.hpp:557
#define __SYCL_INLINE_VER_NAMESPACE(X)
is_gen_based_on_type_sizeof< T, 4, is_ugeninteger > is_ugeninteger32bit
typename change_base_type< T, B >::type change_base_type_t
typename RelationalTestForSignBitType< T >::argument_type rel_sign_bit_test_arg_t
make_type_t< T, gtl::scalar_unsigned_integer_list > make_unsinged_integer_t
common_rel_ret_t< T > internal_host_rel_ret_t
static constexpr T min_v()
is_gen_based_on_type_sizeof< T, 1, is_geninteger > is_geninteger8bit
conditional_t< TryToGetVectorT< SelectMatchingOpenCLType_t< T > >::value, typename TryToGetVectorT< SelectMatchingOpenCLType_t< T > >::type, conditional_t< TryToGetPointerT< SelectMatchingOpenCLType_t< T > >::value, typename TryToGetPointerVecT< SelectMatchingOpenCLType_t< T > >::type, SelectMatchingOpenCLType_t< T > >> ConvertToOpenCLType_t
typename remove_pointer< T >::type remove_pointer_t
select_apply_cl_scalar_t< T, sycl::cl_uchar, sycl::cl_ushort, sycl::cl_uint, sycl::cl_ulong > select_cl_scalar_integral_unsigned_t
typename make_unsigned< T >::type make_unsigned_t
is_gen_based_on_type_sizeof< T, 4, is_geninteger > is_geninteger32bit
typename std::conditional< B, T, F >::type conditional_t
make_type_t< T, gtl::scalar_signed_integer_list > make_singed_integer_t
static constexpr T quiet_NaN()
is_gen_based_on_type_sizeof< T, 2, is_geninteger > is_geninteger16bit
std::integral_constant< bool, V > bool_constant
is_gen_based_on_type_sizeof< T, 8, is_geninteger > is_geninteger64bit
is_gen_based_on_type_sizeof< T, 8, is_ugeninteger > is_ugeninteger64bit
conditional_t< sizeof(T)==1, T8, conditional_t< sizeof(T)==2, T16, conditional_t< sizeof(T)==4, T32, T64 > >> select_apply_cl_scalar_t
select_apply_cl_scalar_t< T, std::false_type, sycl::cl_half, sycl::cl_float, sycl::cl_double > select_cl_scalar_float_t
bool_constant< is_pointer< T >::value &&is_genfloat< remove_pointer_t< T > >::value &&is_address_space_compliant< T, gvl::nonconst_address_space_list >::value > is_genfloatptr
bool_constant< is_pointer< T >::value &&is_gentype< remove_pointer_t< T > >::value &&is_address_space_compliant< T, gvl::nonconst_address_space_list >::value > is_genptr
static constexpr T max_v()
bool_constant< S< T >::value &&(sizeof(vector_element_t< T >)==N)> is_gen_based_on_type_sizeof
is_gen_based_on_type_sizeof< T, 8, is_igeninteger > is_igeninteger64bit
conditional_t< is_vgentype< T >::value, make_singed_integer_t< T >, int > common_rel_ret_t
conditional_t< std::is_integral< T >::value, select_cl_scalar_integral_t< T >, conditional_t< std::is_floating_point< T >::value, select_cl_scalar_float_t< T >, conditional_t< std::is_same< T, half >::value, sycl::detail::half_impl::BIsRepresentationT, T > >> select_cl_scalar_t
is_gen_based_on_type_sizeof< T, 2, is_igeninteger > is_igeninteger16bit
typename nan_types< T, T >::arg_type nan_argument_base_t
typename nan_types< T, T >::ret_type nan_return_t
constexpr bool msbIsSet(const T x)
is_gen_based_on_type_sizeof< T, 2, is_ugeninteger > is_ugeninteger16bit
std::enable_if_t<!(is_vgentype< FROM >::value &&is_vgentype< TO >::value) &&sizeof(TO)==sizeof(FROM), TO > convertDataToType(FROM t)
conditional_t< std::is_signed< T >::value, select_cl_scalar_integral_signed_t< T >, select_cl_scalar_integral_unsigned_t< T > > select_cl_scalar_integral_t
is_gen_based_on_type_sizeof< T, 1, is_ugeninteger > is_ugeninteger8bit
is_gen_based_on_type_sizeof< T, 4, is_igeninteger > is_igeninteger32bit
std::enable_if_t<!TryToGetPointerT< From >::value, To > ConvertNonVectorType(From &t)
select_apply_cl_scalar_t< T, sycl::cl_char, sycl::cl_short, sycl::cl_int, sycl::cl_long > select_cl_scalar_integral_signed_t
find_type_t< TypeList, is_type_size_equal, T > find_same_size_type_t
Definition: type_list.hpp:125
is_gen_based_on_type_sizeof< T, 1, is_igeninteger > is_igeninteger8bit
typename RelationalTestForSignBitType< T >::return_type rel_sign_bit_test_ret_t
typename select_cl_mptr_or_vector_or_scalar_or_ptr< T >::type SelectMatchingOpenCLType_t
bool_constant< is_pointer< T >::value &&is_genint< remove_pointer_t< T > >::value &&is_address_space_compliant< T, gvl::nonconst_address_space_list >::value > is_genintptr
typename TypeHelper< T >::RetType type_helper
make_type_t< T, gtl::scalar_floating_list > make_floating_point_t
typename RelationalReturnType< T >::type internal_rel_ret_t
typename make_type_impl< T, TL >::type make_type_t
typename mptr_or_vec_elem_type< T >::type mptr_or_vec_elem_type_t
std::int8_t cl_char
Definition: aliases.hpp:79
half cl_half
Definition: aliases.hpp:87
std::int16_t cl_short
Definition: aliases.hpp:81
std::uint8_t cl_uchar
Definition: aliases.hpp:80
std::int64_t cl_long
Definition: aliases.hpp:85
std::uint16_t cl_ushort
Definition: aliases.hpp:82
double cl_double
Definition: aliases.hpp:89
std::int32_t cl_int
Definition: aliases.hpp:83
std::uint32_t cl_uint
Definition: aliases.hpp:84
float cl_float
Definition: aliases.hpp:88
unsigned char byte
Definition: image.hpp:63
sycl::detail::half_impl::half half
Definition: aliases.hpp:77
typename remove_decoration< T >::type remove_decoration_t
Definition: access.hpp:321
std::uint64_t cl_ulong
Definition: aliases.hpp:86
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:14
simd< _Tp, _Abi > min(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
simd< _Tp, _Abi > max(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
static multi_ptr< ElementType, Space, DecorateAddress > Convert(multi_ptr< ElementType, Space, DecorateAddress > &t)
static multi_ptr< ElementType, Space, DecorateAddress > Convert(From *t)
static multi_ptr< ElementType, Space, DecorateAddress > Convert(From &t)