DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
66 std::is_same<T, sycl::marray<marray_element_type<T>, T::size()>>::value &&
102 template <
typename T>
105 template <
typename T>
108 template <
typename T>
111 template <
typename T>
114 template <
typename T>
119 template <
typename T>
122 template <
typename T>
125 template <
typename T>
128 template <
typename T>
131 template <
typename T>
134 template <
typename T>
137 template <
typename T>
142 template <
typename T>
145 template <
typename T>
148 template <
typename T>
151 template <
typename T>
154 template <
typename T>
157 template <
typename T>
162 template <
typename T>
165 template <
typename T>
168 template <
typename T>
171 template <
typename T>
174 template <
typename T>
177 template <
typename T>
180 template <
typename T>
183 template <
typename T>
190 template <
typename T>
193 template <
typename T>
196 template <
typename T>
199 template <
typename T>
202 template <
typename T>
205 template <
typename T>
208 template <
typename T>
211 template <
typename T>
214 template <
typename T>
217 template <
typename T>
220 template <
typename T>
223 template <
typename T>
226 template <
typename T>
229 template <
typename T>
232 template <
typename T>
237 template <
typename T>
242 template <
typename T>
250 template <
typename T,
typename Enable =
void>
struct nan_types;
252 template <
typename T>
259 template <
typename T>
266 template <
typename T>
277 template <
typename T>
280 template <
typename T>
283 template <
typename T>
286 template <
typename T>
290 template <
typename T,
typename B,
typename Enable =
void>
293 template <
typename T,
typename B>
298 template <
typename T,
typename B>
303 template <
typename T,
typename B>
310 template <
typename A>
static typename A::pointer_t check(
const A &);
311 template <
typename A>
static typename A::pointer check(
const A &);
314 using type = decltype(check(T()));
315 static constexpr
bool value =
316 std::is_pointer<T>::value || !std::is_same<T, type>::value;
323 template <
typename A>
static typename A::element_type check(
const A &);
324 template <
typename A>
static typename A::value_type check(
const A &);
327 using type = decltype(check(T()));
328 static constexpr
bool value = !std::is_same<T, type>::value;
334 template <
typename A>
static typename A::vector_t check(
const A &);
337 using type = decltype(check(T()));
338 static constexpr
bool value = !std::is_same<T, type>::value;
345 template <
typename A>
350 template <
typename A>
354 using type = decltype(check(T()));
358 template <
typename From>
static To
Convert(From *t) {
359 return reinterpret_cast<To
>(t);
362 template <
typename From>
static To
Convert(From &t) {
365 return reinterpret_cast<To
>(t.get());
372 template <
typename From>
374 return address_space_cast<Space, DecorateAddress>(
378 template <
typename From>
380 return address_space_cast<Space, DecorateAddress>(
384 template <
typename From>
392 typename To,
typename From,
402 template <
typename To,
typename From>
405 return static_cast<To
>(t);
409 using type =
typename T::element_type;
416 IsDecorated == access::decorated::yes>> {
424 template <
typename T>
429 template <
typename T,
typename T8,
typename T16,
typename T32,
typename T64>
436 template <
typename T>
441 template <
typename T>
446 template <
typename T>
451 template <
typename T>
456 std::conditional_t<std::is_same<T, std::complex<half>>::value,
459 template <
typename T>
467 template <
typename T>
481 template <
typename T,
typename Enable =
void>
484 template <
typename T>
486 T, typename detail::
enable_if_t<is_vgentype<T>::value>> {
497 template <
typename T>
499 T, typename detail::
enable_if_t<!is_vgentype<T>::value &&
500 !std::is_pointer<T>::value>> {
504 template <
typename T>
506 T, typename detail::
enable_if_t<!is_vgentype<T>::value &&
507 std::is_pointer<T>::value>> {
510 #ifdef __SYCL_DEVICE_ONLY__
521 template <
typename T,
typename Enable =
void>
530 #if (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0)
538 template <
typename T>
540 T, typename detail::
enable_if_t<is_genptr<T>::value &&
541 !std::is_pointer<T>::value>> {
547 template <
typename T>
549 T, typename detail::
enable_if_t<!is_genptr<T>::value ||
550 std::is_pointer<T>::value>> {
555 template <
typename T>
561 template <
typename T >
566 template <
typename T>
572 template <
typename FROM,
typename TO>
575 sizeof(TO) ==
sizeof(FROM),
578 return t.template as<TO>();
581 template <
typename FROM,
typename TO>
583 is_vgentype<TO>::value) &&
584 sizeof(TO) ==
sizeof(FROM),
587 return ConvertNonVectorType<TO>(t);
591 template <
typename T>
inline constexpr T
msbMask(T) {
593 return T(UT(1) << (
sizeof(T) * 8 - 1));
596 template <
typename T>
inline constexpr
bool msbIsSet(
const T x) {
600 #if defined(SYCL2020_CONFORMANT_APIS) && SYCL_LANGUAGE_VERSION >= 202001
607 template <
typename T>
609 conditional_t<is_vgentype<T>::value, make_singed_integer_t<T>,
bool>;
612 template <
typename T>
614 conditional_t<is_vgentype<T>::value, make_singed_integer_t<T>,
int>;
626 template <
typename T>
633 template <
int N>
struct Boolean;
638 template <
typename T>
640 T, typename detail::
enable_if_t<TryToGetVectorT<T>::value>> {
641 static constexpr
int value = T::size();
643 template <
typename T>
645 T, typename detail::
enable_if_t<!TryToGetVectorT<T>::value>> {
646 static constexpr
int value = 1;
651 #ifdef __SYCL_DEVICE_ONLY__
667 template <
typename T>
672 #ifdef __SYCL_DEVICE_ONLY__
681 template <
typename T>
685 template <
typename T>
691 template <
typename T>
693 T, typename detail::
enable_if_t<TryToGetElementType<T>::value>> {
694 static const int N = T::size();
695 #ifdef __SYCL_DEVICE_ONLY__
704 #ifdef __SYCL_DEVICE_ONLY__
705 typename ret_t::vector_t result(0);
706 for (
size_t I = 0; I < N; ++I) {
707 result[I] = value[I];
716 template <
typename T>
718 T, typename detail::
enable_if_t<!TryToGetElementType<T>::value>> {
720 #ifdef __SYCL_DEVICE_ONLY__
729 template <
typename T>
static constexpr T
max_v() {
733 template <
typename T>
static constexpr T
min_v() {
744 template <
int FirstSize,
typename T,
typename... Args>
748 static constexpr
bool IsSizeEqual = (Size == FirstSize);
751 static constexpr
bool value =
755 template <
int FirstSize>
769 "The built-in function arguments must [point to|have] types "
770 "with the same number of elements.");
change_base_type_t< T, double > ret_type
static To Convert(From &t)
typename select_cl_vector_or_scalar_or_ptr< T >::type type
is_gen_based_on_type_sizeof< T, 8, is_ugeninteger > is_ugeninteger64bit
select_apply_cl_scalar_t< T, sycl::opencl::cl_uchar, sycl::opencl::cl_ushort, sycl::opencl::cl_uint, sycl::opencl::cl_ulong > select_cl_scalar_integral_unsigned_t
make_type_t< T, gtl::scalar_signed_integer_list > make_singed_integer_t
find_same_size_type_t< gtl::scalar_unsigned_short_list, half > arg_type
detail::enable_if_t<!(is_vgentype< FROM >::value &&is_vgentype< TO >::value) &&sizeof(TO)==sizeof(FROM), TO > convertDataToType(FROM t)
is_gen_based_on_type_sizeof< T, 8, is_igeninteger > is_igeninteger64bit
internal_rel_ret_t< T > ret_t
type_list< scalar_unsigned_long_integer_list, vector_unsigned_long_integer_list, marray_unsigned_long_integer_list > unsigned_long_integer_list
conditional_t< sizeof(T)==1, T8, conditional_t< sizeof(T)==2, T16, conditional_t< sizeof(T)==4, T32, T64 > >> select_apply_cl_scalar_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
typename TypeHelper< T >::RetType type_helper
static ret_t apply(bool_t value)
is_gen_based_on_type_sizeof< T, 1, is_ugeninteger > is_ugeninteger8bit
is_gen_based_on_type_sizeof< T, 2, is_geninteger > is_geninteger16bit
typename T::value_type marray_element_type
#define __SYCL_INLINE_VER_NAMESPACE(X)
constexpr bool msbIsSet(const T x)
select_apply_cl_scalar_t< T, sycl::opencl::cl_char, sycl::opencl::cl_short, sycl::opencl::cl_int, sycl::opencl::cl_long > select_cl_scalar_integral_signed_t
bool_constant< S< T >::value &&(sizeof(vector_element_t< T >)==N)> is_gen_based_on_type_sizeof
find_same_size_type_t< gtl::scalar_unsigned_int_list, float > arg_type
change_base_type_t< T, half > ret_type
static constexpr T quiet_NaN()
decltype(check(T())) type
---— Error handling, matching OpenCL plugin semantics.
simd< _Tp, _Abi > max(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
typename multi_ptr< ElementType, Space, IsDecorated >::value_type type
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
static constexpr T min_v()
static multi_ptr< ElementType, Space, DecorateAddress > Convert(multi_ptr< ElementType, Space, DecorateAddress > &t)
static R apply(value_t value)
typename remove_decoration< T >::type remove_decoration_t
typename select_cl_vector_or_scalar_or_ptr< std::remove_pointer_t< T > >::type * elem_ptr_type
typename std::enable_if< B, T >::type enable_if_t
typename make_type_impl< T, TL >::type make_type_t
typename RelationalTestForSignBitType< T >::argument_type rel_sign_bit_test_arg_t
typename make_unsigned< T >::type make_unsigned_t
typename remove_pointer< T >::type remove_pointer_t
is_gen_based_on_type_sizeof< T, 2, is_igeninteger > is_igeninteger16bit
Provides constructors for address space qualified and non address space qualified pointers to allow i...
typename RelationalReturnType< T >::type internal_rel_ret_t
make_type_t< T, gtl::scalar_floating_list > make_floating_point_t
typename change_base_type< T, B >::type change_base_type_t
select_cl_scalar_t< T > type
typename mptr_or_vec_elem_type< T >::type mptr_or_vec_elem_type_t
common_rel_ret_t< T > internal_host_rel_ret_t
internal_host_rel_ret_t< T > type
change_base_type_t< T, float > ret_type
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
find_type_t< TypeList, is_type_size_equal, T > find_same_size_type_t
make_type_t< T, gtl::scalar_unsigned_integer_list > make_unsinged_integer_t
internal_rel_ret_t< T > R
sycl::detail::half_impl::half half
type_list< scalar_unsigned_int_list, vector_unsigned_int_list, marray_unsigned_int_list > unsigned_int_list
typename RelationalTestForSignBitType< T >::return_type rel_sign_bit_test_ret_t
type_list< scalar_unsigned_short_list, vector_unsigned_short_list, marray_unsigned_short_list > unsigned_short_list
decltype(check(T())) type
detail::enable_if_t<!TryToGetPointerT< From >::value, To > ConvertNonVectorType(From &t)
typename multi_ptr< ElementType, Space, IsDecorated > ::element_type type
decltype(check(T())) type
typename nan_types< T, T >::ret_type nan_return_t
conditional_t< is_vgentype< T >::value, make_singed_integer_t< T >, int > common_rel_ret_t
is_gen_based_on_type_sizeof< T, 8, is_geninteger > is_geninteger64bit
decltype(check(T())) type
Provides a cross-patform vector class template that works efficiently on SYCL devices as well as in h...
select_apply_cl_scalar_t< T, std::false_type, sycl::opencl::cl_half, sycl::opencl::cl_float, sycl::opencl::cl_double > select_cl_scalar_float_t
static multi_ptr< ElementType, Space, DecorateAddress > Convert(From *t)
static constexpr T max_v()
is_gen_based_on_type_sizeof< T, 1, is_geninteger > is_geninteger8bit
vec< B, T::size()> operator()(T t)
is_gen_based_on_type_sizeof< T, 4, is_ugeninteger > is_ugeninteger32bit
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, select_cl_scalar_complex_or_T_t< T > >> > select_cl_scalar_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
ConvertToOpenCLTypeImpl_t< SelectMatchingOpenCLType_t< T > > ConvertToOpenCLType_t
is_gen_based_on_type_sizeof< T, 4, is_igeninteger > is_igeninteger32bit
static To Convert(From *t)
typename nan_types< T, T >::arg_type nan_argument_base_t
conditional_t< TryToGetVectorT< T >::value, typename TryToGetVectorT< T >::type, conditional_t< TryToGetPointerT< T >::value, typename TryToGetPointerVecT< T >::type, T > > ConvertToOpenCLTypeImpl_t
is_gen_based_on_type_sizeof< T, 4, is_geninteger > is_geninteger32bit
typename std::conditional< B, T, F >::type conditional_t
is_gen_based_on_type_sizeof< T, 2, is_ugeninteger > is_ugeninteger16bit
static multi_ptr< ElementType, Space, DecorateAddress > Convert(From &t)
bool_constant< std::is_same< T, sycl::marray< marray_element_type< T >, T::size()> >::value &&is_svgenfloat< marray_element_type< T > >::value > is_mgenfloat
is_gen_based_on_type_sizeof< T, 1, is_igeninteger > is_igeninteger8bit
find_same_size_type_t< gtl::scalar_unsigned_long_integer_list, double > arg_type
simd< _Tp, _Abi > min(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
typename select_cl_mptr_or_vector_or_scalar_or_ptr< T >::type SelectMatchingOpenCLType_t
std::conditional_t< std::is_same< T, std::complex< float > >::value, __spv::complex_float, std::conditional_t< std::is_same< T, std::complex< double > >::value, __spv::complex_double, std::conditional_t< std::is_same< T, std::complex< half > >::value, __spv::complex_half, T > >> select_cl_scalar_complex_or_T_t