DPC++ Runtime
Runtime libraries for oneAPI DPC++
builtins.hpp
Go to the documentation of this file.
1 //==----------- builtins.hpp - SYCL built-in functions ---------------------==//
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 <CL/__spirv/spirv_ops.hpp>
14 
15 #include <type_traits>
16 
17 // TODO Decide whether to mark functions with this attribute.
18 #define __NOEXC /*noexcept*/
19 
20 #ifdef __SYCL_DEVICE_ONLY__
21 #define __FUNC_PREFIX_OCL __spirv_ocl_
22 #define __FUNC_PREFIX_CORE __spirv_
23 #define __SYCL_EXTERN_IT1(Ret, prefix, call, Arg1)
24 #define __SYCL_EXTERN_IT2(Ret, prefix, call, Arg1, Arg2)
25 #define __SYCL_EXTERN_IT2_SAME(Ret, prefix, call, Arg)
26 #define __SYCL_EXTERN_IT3(Ret, prefix, call, Arg1, Arg2, Arg3)
27 #else
28 #define __FUNC_PREFIX_OCL
29 #define __FUNC_PREFIX_CORE
30 #define __SYCL_EXTERN_IT1(Ret, prefix, call, Arg) \
31  extern Ret __SYCL_PPCAT(prefix, call)(Arg)
32 #define __SYCL_EXTERN_IT2_SAME(Ret, prefix, call, Arg) \
33  extern Ret __SYCL_PPCAT(prefix, call)(Arg, Arg)
34 #define __SYCL_EXTERN_IT2(Ret, prefix, call, Arg1, Arg2) \
35  extern Ret __SYCL_PPCAT(prefix, call)(Arg1, Arg2)
36 #define __SYCL_EXTERN_IT3(Ret, prefix, call, Arg1, Arg2, Arg3) \
37  extern Ret __SYCL_PPCAT(prefix, call)(Arg1, Arg2, Arg3)
38 #endif
39 
40 #define __SYCL_PPCAT_NX(A, B) A##B
41 #define __SYCL_PPCAT(A, B) __SYCL_PPCAT_NX(A, B)
42 
43 #define __SYCL_MAKE_CALL_ARG1(call, prefix) \
44  template <typename R, typename T1> \
45  inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1) __NOEXC { \
46  using Ret = cl::sycl::detail::ConvertToOpenCLType_t<R>; \
47  using Arg1 = cl::sycl::detail::ConvertToOpenCLType_t<T1>; \
48  __SYCL_EXTERN_IT1(Ret, prefix, call, Arg1); \
49  Arg1 arg1 = cl::sycl::detail::convertDataToType<T1, Arg1>(t1); \
50  Ret ret = __SYCL_PPCAT(prefix, call)(arg1); \
51  return cl::sycl::detail::convertDataToType<Ret, R>(ret); \
52  }
53 
54 #define __SYCL_MAKE_CALL_ARG2(call, prefix) \
55  template <typename R, typename T1, typename T2> \
56  inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1, T2 t2) __NOEXC { \
57  using Ret = cl::sycl::detail::ConvertToOpenCLType_t<R>; \
58  using Arg1 = cl::sycl::detail::ConvertToOpenCLType_t<T1>; \
59  using Arg2 = cl::sycl::detail::ConvertToOpenCLType_t<T2>; \
60  __SYCL_EXTERN_IT2(Ret, prefix, call, Arg1, Arg2); \
61  Arg1 arg1 = cl::sycl::detail::convertDataToType<T1, Arg1>(t1); \
62  Arg2 arg2 = cl::sycl::detail::convertDataToType<T2, Arg2>(t2); \
63  Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
64  return cl::sycl::detail::convertDataToType<Ret, R>(ret); \
65  }
66 
67 #define __SYCL_MAKE_CALL_ARG2_SAME(call, prefix) \
68  template <typename R, typename T> \
69  inline __SYCL_ALWAYS_INLINE R __invoke_##call(T t1, T t2) __NOEXC { \
70  using Ret = cl::sycl::detail::ConvertToOpenCLType_t<R>; \
71  using Arg = cl::sycl::detail::ConvertToOpenCLType_t<T>; \
72  __SYCL_EXTERN_IT2_SAME(Ret, prefix, call, Arg); \
73  Arg arg1 = cl::sycl::detail::convertDataToType<T, Arg>(t1); \
74  Arg arg2 = cl::sycl::detail::convertDataToType<T, Arg>(t2); \
75  Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
76  return cl::sycl::detail::convertDataToType<Ret, R>(ret); \
77  }
78 
79 #define __SYCL_MAKE_CALL_ARG2_SAME_RESULT(call, prefix) \
80  template <typename T> \
81  inline __SYCL_ALWAYS_INLINE T __invoke_##call(T v1, T v2) __NOEXC { \
82  using Type = cl::sycl::detail::ConvertToOpenCLType_t<T>; \
83  __SYCL_EXTERN_IT2_SAME(Type, prefix, call, Type); \
84  Type arg1 = cl::sycl::detail::convertDataToType<T, Type>(v1); \
85  Type arg2 = cl::sycl::detail::convertDataToType<T, Type>(v2); \
86  Type ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
87  return cl::sycl::detail::convertDataToType<Type, T>(ret); \
88  }
89 
90 #define __SYCL_MAKE_CALL_ARG3(call, prefix) \
91  template <typename R, typename T1, typename T2, typename T3> \
92  inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1, T2 t2, T3 t3) __NOEXC { \
93  using Ret = cl::sycl::detail::ConvertToOpenCLType_t<R>; \
94  using Arg1 = cl::sycl::detail::ConvertToOpenCLType_t<T1>; \
95  using Arg2 = cl::sycl::detail::ConvertToOpenCLType_t<T2>; \
96  using Arg3 = cl::sycl::detail::ConvertToOpenCLType_t<T3>; \
97  __SYCL_EXTERN_IT3(Ret, prefix, call, Arg1, Arg2, Arg3); \
98  Arg1 arg1 = cl::sycl::detail::convertDataToType<T1, Arg1>(t1); \
99  Arg2 arg2 = cl::sycl::detail::convertDataToType<T2, Arg2>(t2); \
100  Arg3 arg3 = cl::sycl::detail::convertDataToType<T3, Arg3>(t3); \
101  Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2, arg3); \
102  return cl::sycl::detail::convertDataToType<Ret, R>(ret); \
103  }
104 
105 #ifndef __SYCL_DEVICE_ONLY__
107 namespace __host_std {
108 #endif // __SYCL_DEVICE_ONLY__
109 /* ----------------- 4.13.3 Math functions. ---------------------------------*/
205 /* --------------- 4.13.4 Integer functions. --------------------------------*/
240 /* --------------- 4.13.5 Common functions. ---------------------------------*/
250 /* --------------- 4.13.6 Geometric Functions. ------------------------------*/
260 /* --------------- 4.13.7 Relational functions. -----------------------------*/
263 __SYCL_MAKE_CALL_ARG2_SAME(FOrdGreaterThan, __FUNC_PREFIX_CORE) // isgreater
264 __SYCL_MAKE_CALL_ARG2_SAME(FOrdGreaterThanEqual,
265  __FUNC_PREFIX_CORE) // isgreaterequal
266 __SYCL_MAKE_CALL_ARG2_SAME(FOrdLessThan, __FUNC_PREFIX_CORE) // isless
267 __SYCL_MAKE_CALL_ARG2_SAME(FOrdLessThanEqual, __FUNC_PREFIX_CORE) // islessequal
268 __SYCL_MAKE_CALL_ARG2_SAME(FOrdNotEqual, __FUNC_PREFIX_CORE) // islessgreater
269 __SYCL_MAKE_CALL_ARG2_SAME(LessOrGreater, __FUNC_PREFIX_CORE) // islessgreater
270 __SYCL_MAKE_CALL_ARG1(IsFinite, __FUNC_PREFIX_CORE) // isfinite
273 __SYCL_MAKE_CALL_ARG1(IsNormal, __FUNC_PREFIX_CORE) // isnormal
275 __SYCL_MAKE_CALL_ARG2_SAME(Unordered, __FUNC_PREFIX_CORE) // isunordered
276 __SYCL_MAKE_CALL_ARG1(SignBitSet, __FUNC_PREFIX_CORE) // signbit
281 #ifndef __SYCL_DEVICE_ONLY__
282 } // namespace __host_std
283 } // __SYCL_INLINE_NAMESPACE(cl)
284 #endif
285 
286 #undef __NOEXC
287 #undef __SYCL_MAKE_CALL_ARG1
288 #undef __SYCL_MAKE_CALL_ARG2
289 #undef __SYCL_MAKE_CALL_ARG2_SAME
290 #undef __SYCL_MAKE_CALL_ARG2_SAME_RESULT
291 #undef __SYCL_MAKE_CALL_ARG3
292 #undef __SYCL_PPCAT_NX
293 #undef __SYCL_PPCAT
294 #undef __FUNC_PREFIX_OCL
295 #undef __FUNC_PREFIX_CORE
296 #undef __SYCL_EXTERN_IT1
297 #undef __SYCL_EXTERN_IT2
298 #undef __SYCL_EXTERN_IT2_SAME
299 #undef __SYCL_EXTERN_IT3
cl::sycl::maxmag
detail::enable_if_t< detail::is_genfloat< T >::value, T > maxmag(T x, T y) __NOEXC
Definition: builtins.hpp:343
cl::__host_std::half_sqrt
s::cl_float half_sqrt(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:988
cl::sycl::pown
detail::enable_if_t< detail::is_genfloat< T >::value &&detail::is_genint< T2 >::value, T > pown(T x, T2 y) __NOEXC
Definition: builtins.hpp:386
spirv_ops.hpp
cl::sycl::fast_normalize
detail::enable_if_t< detail::is_gengeodouble< T >::value, T > fast_normalize(T p) __NOEXC
Definition: builtins.hpp:1108
cl::__host_std::native_sqrt
s::cl_float native_sqrt(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:907
cl::__host_std::half_divide
s::cl_float half_divide(s::cl_float x, s::cl_float y) __NOEXC
Definition: builtins_math.cpp:926
cl::__host_std::s_clamp
s::cl_char s_clamp(s::cl_char x, s::cl_char minval, s::cl_char maxval) __NOEXC
Definition: builtins_integer.cpp:432
cl::sycl::popcount
detail::enable_if_t< detail::is_geninteger< T >::value, T > popcount(T x) __NOEXC
Definition: builtins.hpp:932
cl::__host_std::half_exp10
s::cl_float half_exp10(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:943
cl::sycl::half_precision::log
detail::enable_if_t< detail::is_genfloatf< T >::value, T > log(T x) __NOEXC
Definition: builtins.hpp:1518
cl::sycl::half_precision::rsqrt
detail::enable_if_t< detail::is_genfloatf< T >::value, T > rsqrt(T x) __NOEXC
Definition: builtins.hpp:1548
cl::__host_std::native_sin
s::cl_float native_sin(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:901
cl::sycl::modf
detail::enable_if_t< detail::is_genfloat< T >::value &&detail::is_genfloatptr< T2 >::value, T > modf(T x, T2 iptr) __NOEXC
Definition: builtins.hpp:357
cl::__host_std::s_mad_sat
s::cl_char s_mad_sat(s::cl_char a, s::cl_char b, s::cl_char c) __NOEXC
Definition: builtins_integer.cpp:574
cl::__host_std::u_mul_hi
s::cl_uchar u_mul_hi(s::cl_uchar a, s::cl_uchar b)
Definition: builtins_integer.cpp:512
cl::__host_std::u_abs
s::cl_uchar u_abs(s::cl_uchar x) __NOEXC
Definition: builtins_integer.cpp:241
cl::__host_std::native_tan
s::cl_float native_tan(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:913
cl::sycl::cbrt
detail::enable_if_t< detail::is_genfloat< T >::value, T > cbrt(T x) __NOEXC
Definition: builtins.hpp:105
cl::__host_std::u_abs_diff
s::cl_uchar u_abs_diff(s::cl_uchar x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:261
cl::sycl::fract
detail::enable_if_t< detail::is_genfloat< T >::value &&detail::is_genfloatptr< T2 >::value, T > fract(T x, T2 iptr) __NOEXC
Definition: builtins.hpp:237
cl::__host_std::u_mad24
s::cl_uint u_mad24(s::cl_uint x, s::cl_uint y, s::cl_uint z) __NOEXC
Definition: builtins_integer.cpp:836
cl::sycl::fmax
detail::enable_if_t< detail::is_vgenfloat< T >::value, T > fmax(T x, typename T::element_type y) __NOEXC
Definition: builtins.hpp:210
cl::sycl::expm1
detail::enable_if_t< detail::is_genfloat< T >::value, T > expm1(T x) __NOEXC
Definition: builtins.hpp:172
cl::sycl::select
detail::enable_if_t< detail::is_genfloath< T >::value &&detail::is_ugeninteger16bit< T2 >::value, T > select(T a, T b, T2 c) __NOEXC
Definition: builtins.hpp:1390
cl::sycl::nextafter
detail::enable_if_t< detail::is_genfloat< T >::value, T > nextafter(T x, T y) __NOEXC
Definition: builtins.hpp:371
cl::sycl::fmod
detail::enable_if_t< detail::is_genfloat< T >::value, T > fmod(T x, T y) __NOEXC
Definition: builtins.hpp:229
cl::__host_std::All
s::cl_int All(s::vec< int, 1 >)
cl::sycl::cospi
detail::enable_if_t< detail::is_genfloat< T >::value, T > cospi(T x) __NOEXC
Definition: builtins.hpp:136
cl::__host_std::half_tan
s::cl_float half_tan(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:994
cl::sycl::tanpi
detail::enable_if_t< detail::is_genfloat< T >::value, T > tanpi(T x) __NOEXC
Definition: builtins.hpp:487
cl::sycl::trunc
detail::enable_if_t< detail::is_genfloat< T >::value, T > trunc(T x) __NOEXC
Definition: builtins.hpp:499
cl::__host_std::native_recip
s::cl_float native_recip(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:889
cl::sycl::lgamma
detail::enable_if_t< detail::is_genfloat< T >::value, T > lgamma(T x) __NOEXC
Definition: builtins.hpp:291
cl::__host_std::s_add_sat
s::cl_char s_add_sat(s::cl_char x, s::cl_char y) __NOEXC
Definition: builtins_integer.cpp:316
cl::sycl::half_precision::sqrt
detail::enable_if_t< detail::is_genfloatf< T >::value, T > sqrt(T x) __NOEXC
Definition: builtins.hpp:1560
cl::sycl::asinh
detail::enable_if_t< detail::is_genfloat< T >::value, T > asinh(T x) __NOEXC
Definition: builtins.hpp:62
cl::__host_std::native_divide
s::cl_float native_divide(s::cl_float x, s::cl_float y) __NOEXC
Definition: builtins_math.cpp:841
cl::sycl::mad
detail::enable_if_t< detail::is_genfloat< T >::value, T > mad(T a, T b, T c) __NOEXC
Definition: builtins.hpp:336
cl::__host_std::u_min
s::cl_uchar u_min(s::cl_uchar x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:684
cl::sycl::normalize
detail::enable_if_t< detail::is_gengeohalf< T >::value, T > normalize(T p) __NOEXC
Definition: builtins.hpp:1066
cl::__host_std::u_sub_sat
s::cl_uchar u_sub_sat(s::cl_uchar x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:740
cl::sycl::atan2pi
detail::enable_if_t< detail::is_genfloat< T >::value, T > atan2pi(T y, T x) __NOEXC
Definition: builtins.hpp:98
cl::sycl::remquo
detail::enable_if_t< detail::is_genfloat< T >::value &&detail::is_genintptr< T2 >::value, T > remquo(T x, T y, T2 quo) __NOEXC
Definition: builtins.hpp:408
cl::sycl::lgamma_r
detail::enable_if_t< detail::is_genfloat< T >::value &&detail::is_genintptr< T2 >::value, T > lgamma_r(T x, T2 signp) __NOEXC
Definition: builtins.hpp:299
cl::sycl::cross
detail::enable_if_t< detail::is_gencross< T >::value, T > cross(T p0, T p1) __NOEXC
Definition: builtins.hpp:974
cl::__host_std::u_mul24
s::cl_uint u_mul24(s::cl_uint x, s::cl_uint y) __NOEXC
Definition: builtins_integer.cpp:849
cl::sycl::atan
detail::enable_if_t< detail::is_genfloat< T >::value, T > atan(T y_over_x) __NOEXC
Definition: builtins.hpp:74
cl::sycl::fast_distance
double fast_distance(T p0, T p1) __NOEXC
Definition: builtins.hpp:1080
cl::__host_std::native_cos
s::cl_float native_cos(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:835
cl::sycl::half_precision::log10
detail::enable_if_t< detail::is_genfloatf< T >::value, T > log10(T x) __NOEXC
Definition: builtins.hpp:1530
cl::sycl::minmag
detail::enable_if_t< detail::is_genfloat< T >::value, T > minmag(T x, T y) __NOEXC
Definition: builtins.hpp:349
cl::__host_std::half_recip
s::cl_float half_recip(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:972
cl::sycl::floor
detail::enable_if_t< detail::is_genfloat< T >::value, T > floor(T x) __NOEXC
Definition: builtins.hpp:190
cl::sycl::logb
detail::enable_if_t< detail::is_genfloat< T >::value, T > logb(T x) __NOEXC
Definition: builtins.hpp:330
cl::__host_std::s_min
s::cl_char s_min(s::cl_char x, s::cl_char y) __NOEXC
Definition: builtins_integer.cpp:662
cl::__host_std::native_exp
s::cl_float native_exp(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:847
cl::sycl::step
detail::enable_if_t< detail::is_vgenfloat< T >::value, T > step(typename T::element_type edge, T x) __NOEXC
Definition: builtins.hpp:599
cl::sycl::log1p
detail::enable_if_t< detail::is_genfloat< T >::value, T > log1p(T x) __NOEXC
Definition: builtins.hpp:324
cl::__host_std::native_log2
s::cl_float native_log2(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:871
cl::__host_std::s_mul_hi
s::cl_char s_mul_hi(s::cl_char a, s::cl_char b)
Definition: builtins_integer.cpp:494
cl::__host_std::s_mad_hi
s::cl_char s_mad_hi(s::cl_char x, s::cl_char minval, s::cl_char maxval) __NOEXC
Definition: builtins_integer.cpp:530
cl::__host_std::half_sin
s::cl_float half_sin(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:982
cl::__host_std::Dot
s::cl_half Dot(s::vec< s::half, 1 >, s::vec< s::half, 1 >)
cl::sycl::fdim
detail::enable_if_t< detail::is_genfloat< T >::value, T > fdim(T x, T y) __NOEXC
Definition: builtins.hpp:184
__SYCL_MAKE_CALL_ARG2_SAME
#define __SYCL_MAKE_CALL_ARG2_SAME(call, prefix)
Definition: builtins.hpp:67
__FUNC_PREFIX_CORE
#define __FUNC_PREFIX_CORE
Definition: builtins.hpp:29
cl::__host_std::u_clamp
s::cl_uchar u_clamp(s::cl_uchar x, s::cl_uchar minval, s::cl_uchar maxval) __NOEXC
Definition: builtins_integer.cpp:406
cl::__host_std::half_exp
s::cl_float half_exp(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:932
cl::sycl::rootn
detail::enable_if_t< detail::is_genfloat< T >::value &&detail::is_genint< T2 >::value, T > rootn(T x, T2 y) __NOEXC
Definition: builtins.hpp:423
cl::sycl::acos
detail::enable_if_t< detail::is_genfloat< T >::value, T > acos(T x) __NOEXC
Definition: builtins.hpp:38
cl::__host_std::s_upsample
s::cl_short s_upsample(s::cl_char x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:789
cl::sycl::half_precision::log2
detail::enable_if_t< detail::is_genfloatf< T >::value, T > log2(T x) __NOEXC
Definition: builtins.hpp:1524
cl::sycl::fast_length
double fast_length(T p) __NOEXC
Definition: builtins.hpp:1094
cl::__host_std::FOrdEqual
s::cl_int FOrdEqual(s::cl_float x, s::cl_float y) __NOEXC
Definition: builtins_relational.cpp:150
cl::__host_std::s_mul24
s::cl_int s_mul24(s::cl_int x, s::cl_int y) __NOEXC
Definition: builtins_integer.cpp:855
cl::sycl::half_precision::tan
detail::enable_if_t< detail::is_genfloatf< T >::value, T > tan(T x) __NOEXC
Definition: builtins.hpp:1566
cl::__host_std::u_mad_sat
s::cl_uchar u_mad_sat(s::cl_uchar a, s::cl_uchar b, s::cl_uchar c) __NOEXC
Definition: builtins_integer.cpp:596
cl::__host_std::u_max
s::cl_uchar u_max(s::cl_uchar x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:640
cl::__host_std::half_exp2
s::cl_float half_exp2(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:937
__SYCL_MAKE_CALL_ARG2
#define __SYCL_MAKE_CALL_ARG2(call, prefix)
Definition: builtins.hpp:54
cl::sycl::fabs
detail::enable_if_t< detail::is_genfloat< T >::value, T > fabs(T x) __NOEXC
Definition: builtins.hpp:178
cl::sycl::radians
detail::enable_if_t< detail::is_genfloat< T >::value, T > radians(T degrees) __NOEXC
Definition: builtins.hpp:583
cl::sycl::detail::Ordered
@ Ordered
Definition: queue_impl.hpp:52
cl::sycl::fma
detail::enable_if_t< detail::is_genfloat< T >::value, T > fma(T a, T b, T c) __NOEXC
Definition: builtins.hpp:196
generic_type_traits.hpp
cl::sycl::erf
detail::enable_if_t< detail::is_genfloat< T >::value, T > erf(T x) __NOEXC
Definition: builtins.hpp:148
cl::__host_std::FMul
s::cl_float FMul(s::cl_float p0, s::cl_float p1)
Definition: builtins_geometric.cpp:134
cl::__host_std::s_abs_diff
s::cl_uchar s_abs_diff(s::cl_char x, s::cl_char y) __NOEXC
Definition: builtins_integer.cpp:280
cl::sycl::distance
half distance(T p0, T p1) __NOEXC
Definition: builtins.hpp:1025
cl::__host_std::FUnordNotEqual
s::cl_int FUnordNotEqual(s::cl_float x, s::cl_float y) __NOEXC
Definition: builtins_relational.cpp:164
cl::__host_std::s_hadd
s::cl_char s_hadd(s::cl_char x, s::cl_char y) __NOEXC
Definition: builtins_integer.cpp:352
cl::sycl::acospi
detail::enable_if_t< detail::is_genfloat< T >::value, T > acospi(T x) __NOEXC
Definition: builtins.hpp:50
cl::__host_std::fclamp
s::cl_float fclamp(s::cl_float x, s::cl_float minval, s::cl_float maxval) __NOEXC
Definition: builtins_common.cpp:69
cl::sycl::length
half length(T p) __NOEXC
Definition: builtins.hpp:1046
cl::sycl::hypot
detail::enable_if_t< detail::is_genfloat< T >::value, T > hypot(T x, T y) __NOEXC
Definition: builtins.hpp:253
__SYCL_MAKE_CALL_ARG3
#define __SYCL_MAKE_CALL_ARG3(call, prefix)
Definition: builtins.hpp:90
cl::__host_std::u_mad_hi
s::cl_uchar u_mad_hi(s::cl_uchar x, s::cl_uchar minval, s::cl_uchar maxval) __NOEXC
Definition: builtins_integer.cpp:552
cl::__host_std::s_abs
s::cl_uchar s_abs(s::cl_char x) __NOEXC
Definition: builtins_integer.cpp:251
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::sign
detail::enable_if_t< detail::is_genfloat< T >::value, T > sign(T x) __NOEXC
Definition: builtins.hpp:622
cl::sycl::half_precision::exp
detail::enable_if_t< detail::is_genfloatf< T >::value, T > exp(T x) __NOEXC
Definition: builtins.hpp:1500
cl::__host_std::s_mad24
s::cl_int s_mad24(s::cl_int x, s::cl_int y, s::cl_int z) __NOEXC
Definition: builtins_integer.cpp:843
__SYCL_MAKE_CALL_ARG1
#define __SYCL_MAKE_CALL_ARG1(call, prefix)
Definition: builtins.hpp:43
cl::__host_std::half_log2
s::cl_float half_log2(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:954
cl::__host_std::native_rsqrt
s::cl_float native_rsqrt(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:895
cl::sycl::degrees
detail::enable_if_t< detail::is_genfloat< T >::value, T > degrees(T radians) __NOEXC
Definition: builtins.hpp:524
cl::sycl::cosh
detail::enable_if_t< detail::is_genfloat< T >::value, T > cosh(T x) __NOEXC
Definition: builtins.hpp:130
__SYCL_MAKE_CALL_ARG2_SAME_RESULT
#define __SYCL_MAKE_CALL_ARG2_SAME_RESULT(call, prefix)
Definition: builtins.hpp:79
cl::__host_std::half_rsqrt
s::cl_float half_rsqrt(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:976
cl::__host_std::fmin_common
s::cl_float fmin_common(s::cl_float x, s::cl_float y) __NOEXC
Definition: builtins_common.cpp:100
cl::__host_std::half_log10
s::cl_float half_log10(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:960
cl::__host_std::fmax_common
s::cl_float fmax_common(s::cl_float x, s::cl_float y) __NOEXC
Definition: builtins_common.cpp:114
cl::sycl::ceil
detail::enable_if_t< detail::is_genfloat< T >::value, T > ceil(T x) __NOEXC
Definition: builtins.hpp:111
cl::sycl::ldexp
detail::enable_if_t< detail::is_vgenfloat< T >::value &&detail::is_intn< T2 >::value, T > ldexp(T x, T2 k) __NOEXC
Definition: builtins.hpp:284
cl::sycl::asinpi
detail::enable_if_t< detail::is_genfloat< T >::value, T > asinpi(T x) __NOEXC
Definition: builtins.hpp:68
cl::__host_std::native_powr
s::cl_float native_powr(s::cl_float x, s::cl_float y) __NOEXC
Definition: builtins_math.cpp:883
cl::sycl::pow
detail::enable_if_t< detail::is_genfloat< T >::value, T > pow(T x, T y) __NOEXC
Definition: builtins.hpp:378
cl::__host_std::s_sub_sat
s::cl_char s_sub_sat(s::cl_char x, s::cl_char y) __NOEXC
Definition: builtins_integer.cpp:758
cl::sycl::fmin
detail::enable_if_t< detail::is_vgenfloat< T >::value, T > fmin(T x, typename T::element_type y) __NOEXC
Definition: builtins.hpp:223
cl::sycl::rint
detail::enable_if_t< detail::is_genfloat< T >::value, T > rint(T x) __NOEXC
Definition: builtins.hpp:415
cl::sycl::sinh
detail::enable_if_t< detail::is_genfloat< T >::value, T > sinh(T x) __NOEXC
Definition: builtins.hpp:457
cl::__host_std::native_log10
s::cl_float native_log10(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:877
cl::sycl::mix
detail::enable_if_t< detail::is_vgenfloat< T >::value, T > mix(T x, T y, typename T::element_type a) __NOEXC
Definition: builtins.hpp:576
cl::sycl::copysign
detail::enable_if_t< detail::is_genfloat< T >::value, T > copysign(T x, T y) __NOEXC
Definition: builtins.hpp:117
cl::sycl::atan2
detail::enable_if_t< detail::is_genfloat< T >::value, T > atan2(T y, T x) __NOEXC
Definition: builtins.hpp:80
cl::sycl::sinpi
detail::enable_if_t< detail::is_genfloat< T >::value, T > sinpi(T x) __NOEXC
Definition: builtins.hpp:463
cl::sycl::acosh
detail::enable_if_t< detail::is_genfloat< T >::value, T > acosh(T x) __NOEXC
Definition: builtins.hpp:44
cl::sycl::atanpi
detail::enable_if_t< detail::is_genfloat< T >::value, T > atanpi(T x) __NOEXC
Definition: builtins.hpp:92
cl::__host_std::u_rhadd
s::cl_uchar u_rhadd(s::cl_uchar x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:370
cl::__host_std::u_hadd
s::cl_uchar u_hadd(s::cl_uchar x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:334
cl::sycl::tgamma
detail::enable_if_t< detail::is_genfloat< T >::value, T > tgamma(T x) __NOEXC
Definition: builtins.hpp:493
cl::sycl::atanh
detail::enable_if_t< detail::is_genfloat< T >::value, T > atanh(T x) __NOEXC
Definition: builtins.hpp:86
cl::sycl::ilogb
detail::change_base_type_t< T, int > ilogb(T x) __NOEXC
Definition: builtins.hpp:260
cl::sycl::half_precision::sin
detail::enable_if_t< detail::is_genfloatf< T >::value, T > sin(T x) __NOEXC
Definition: builtins.hpp:1554
cl::__host_std::half_powr
s::cl_float half_powr(s::cl_float x, s::cl_float y) __NOEXC
Definition: builtins_math.cpp:966
cl::sycl::half_precision::cos
detail::enable_if_t< detail::is_genfloatf< T >::value, T > cos(T x) __NOEXC
Definition: builtins.hpp:1487
cl::__host_std::native_exp2
s::cl_float native_exp2(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:853
cl::sycl::ext::oneapi::experimental::native::tanh
__SYCL_ALWAYS_INLINE sycl::detail::enable_if_t< sycl::detail::is_genfloatf< T >::value||sycl::detail::is_genfloath< T >::value, T > tanh(T x) __NOEXC
Definition: builtins.hpp:92
common.hpp
cl::sycl::round
detail::enable_if_t< detail::is_genfloat< T >::value, T > round(T x) __NOEXC
Definition: builtins.hpp:430
cl::__host_std::u_upsample
s::cl_ushort u_upsample(s::cl_uchar x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:776
cl::sycl::frexp
detail::enable_if_t< detail::is_genfloat< T >::value &&detail::is_genintptr< T2 >::value, T > frexp(T x, T2 exp) __NOEXC
Definition: builtins.hpp:246
cl::sycl::asin
detail::enable_if_t< detail::is_genfloat< T >::value, T > asin(T x) __NOEXC
Definition: builtins.hpp:56
cl::__host_std::u_add_sat
s::cl_uchar u_add_sat(s::cl_uchar x, s::cl_uchar y) __NOEXC
Definition: builtins_integer.cpp:298
cl::sycl::erfc
detail::enable_if_t< detail::is_genfloat< T >::value, T > erfc(T x) __NOEXC
Definition: builtins.hpp:142
cl::__host_std::half_log
s::cl_float half_log(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:948
cl::sycl::half_precision::exp10
detail::enable_if_t< detail::is_genfloatf< T >::value, T > exp10(T x) __NOEXC
Definition: builtins.hpp:1512
cl::__host_std::half_cos
s::cl_float half_cos(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:920
cl::sycl::rotate
detail::enable_if_t< detail::is_geninteger< T >::value, T > rotate(T v, T i) __NOEXC
Definition: builtins.hpp:857
cl::__host_std::s_max
s::cl_char s_max(s::cl_char x, s::cl_char y) __NOEXC
Definition: builtins_integer.cpp:618
cl::sycl::smoothstep
detail::enable_if_t< detail::is_vgenfloat< T >::value, T > smoothstep(typename T::element_type edge0, typename T::element_type edge1, T x) __NOEXC
Definition: builtins.hpp:615
cl::sycl::ctz
detail::enable_if_t< detail::is_geninteger< T >::value, T > ctz(T x) __NOEXC
Definition: builtins.hpp:736
cl::__host_std::native_log
s::cl_float native_log(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:865
cl::sycl::half_precision::powr
detail::enable_if_t< detail::is_genfloatf< T >::value, T > powr(T x, T y) __NOEXC
Definition: builtins.hpp:1536
cl::sycl::remainder
detail::enable_if_t< detail::is_genfloat< T >::value, T > remainder(T x, T y) __NOEXC
Definition: builtins.hpp:399
__FUNC_PREFIX_OCL
#define __FUNC_PREFIX_OCL
Definition: builtins.hpp:28
cl::sycl::clz
detail::enable_if_t< detail::is_geninteger< T >::value, T > clz(T x) __NOEXC
Definition: builtins.hpp:730
cl::sycl::ext::oneapi::experimental::native::exp2
__SYCL_ALWAYS_INLINE sycl::detail::enable_if_t< sycl::detail::is_genfloath< T >::value, T > exp2(T x) __NOEXC
Definition: builtins.hpp:107
cl::__host_std::s_rhadd
s::cl_char s_rhadd(s::cl_char x, s::cl_char y) __NOEXC
Definition: builtins_integer.cpp:388
cl::sycl::sincos
detail::enable_if_t< detail::is_genfloat< T >::value &&detail::is_genfloatptr< T2 >::value, T > sincos(T x, T2 cosval) __NOEXC
Definition: builtins.hpp:450
cl::sycl::bitselect
detail::enable_if_t< detail::is_gentype< T >::value, T > bitselect(T a, T b, T c) __NOEXC
Definition: builtins.hpp:1311
cl::sycl::nan
detail::nan_return_t< T > nan(T nancode) __NOEXC
Definition: builtins.hpp:364
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12
cl::__host_std::native_exp10
s::cl_float native_exp10(s::cl_float x) __NOEXC
Definition: builtins_math.cpp:859