DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
16 #define _USE_MATH_DEFINES
24 namespace d = s::detail;
27 namespace __host_std {
30 template <
typename T>
inline T __acospi(
T x) {
return std::acos(x) / M_PI; }
32 template <
typename T>
inline T __asinpi(
T x) {
return std::asin(x) / M_PI; }
34 template <
typename T>
inline T __atanpi(
T x) {
return std::atan(x) / M_PI; }
36 template <
typename T>
inline T __atan2pi(
T x,
T y) {
40 template <
typename T>
inline T __cospi(
T x) {
return std::cos(M_PI * x); }
42 template <
typename T>
T inline __fract(
T x,
T *iptr) {
48 template <
typename T>
inline T __lgamma_r(
T x,
s::cl_int *signp) {
54 template <
typename T>
inline T __mad(
T a,
T b,
T c) {
return (a * b) + c; }
56 template <
typename T>
inline T __maxmag(
T x,
T y) {
61 return std::fmax(x, y);
64 template <
typename T>
inline T __minmag(
T x,
T y) {
69 return std::fmin(x, y);
72 template <
typename T>
inline T __powr(
T x,
T y) {
76 template <
typename T>
inline T __rootn(
T x,
s::cl_int y) {
80 template <
typename T>
inline T __rsqrt(
T x) {
return T(1.0) /
std::sqrt(x); }
82 template <
typename T>
inline T __sincos(
T x,
T *cosval) {
87 template <
typename T>
inline T __sinpi(
T x) {
return std::sin(M_PI * x); }
89 template <
typename T>
inline T __tanpi(
T x) {
return std::tan(M_PI * x); }
194 return __atan2pi(x, y);
197 return __atan2pi(x, y);
200 return __atan2pi(x, y);
349 return std::fma(a, b, c);
353 return std::fma(a, b, c);
356 return std::fma(a, b, c);
364 return std::fmax(x, y);
367 return std::fmax(x, y);
370 return std::fmax(x, y);
378 return std::fmin(x, y);
381 return std::fmin(x, y);
384 return std::fmin(x, y);
420 return __fract(x, iptr);
423 return __fract(x, iptr);
426 return __fract(x, iptr);
496 return __lgamma_r(x, signp);
499 return __lgamma_r(x, signp);
502 return __lgamma_r(x, signp);
555 return __mad(a, b, c);
559 return __mad(a, b, c);
562 return __mad(a, b, c);
570 return __maxmag(x, y);
573 return __maxmag(x, y);
576 return __maxmag(x, y);
584 return __minmag(x, y);
587 return __minmag(x, y);
590 return __minmag(x, y);
613 return d::quiet_NaN<s::cl_float>();
617 return d::quiet_NaN<s::cl_double>();
621 return s::cl_half(d::quiet_NaN<s::cl_float>());
710 return __rootn(x, y);
713 return __rootn(x, y);
716 return __rootn(x, y);
750 return __sincos(x, cosval);
754 return __sincos(x, cosval);
757 return __sincos(x, cosval);
884 return (x >= 0 ?
std::pow(x, y) : x);
967 return (x >= 0 ?
std::pow(x, y) : x);
s::cl_float half_sqrt(s::cl_float x) __NOEXC
s::cl_int ilogb(s::cl_half x) __NOEXC
s::cl_float native_sqrt(s::cl_float x) __NOEXC
s::cl_half rootn(s::cl_half x, s::cl_int y) __NOEXC
s::cl_half rint(s::cl_half x) __NOEXC
s::cl_float half_divide(s::cl_float x, s::cl_float y) __NOEXC
s::cl_half tgamma(s::cl_half x) __NOEXC
s::cl_half lgamma_r(s::cl_half x, s::cl_int *signp) __NOEXC
s::cl_float half_exp10(s::cl_float x) __NOEXC
T cast_if_host_half(T val)
s::cl_half sqrt(s::cl_half x) __NOEXC
#define MAKE_1V_2V_3V(Fun, Ret, Arg1, Arg2, Arg3)
s::cl_half exp2(s::cl_half x) __NOEXC
s::cl_float native_sin(s::cl_float x) __NOEXC
s::cl_half tanpi(s::cl_half x) __NOEXC
s::cl_half asin(s::cl_half x) __NOEXC
s::cl_float native_tan(s::cl_float x) __NOEXC
s::cl_half tanh(s::cl_half x) __NOEXC
s::cl_half cbrt(s::cl_half x) __NOEXC
s::cl_float half_tan(s::cl_float x) __NOEXC
s::cl_float native_recip(s::cl_float x) __NOEXC
s::cl_half fract(s::cl_half x, s::cl_half *iptr) __NOEXC
s::cl_half cospi(s::cl_half x) __NOEXC
s::cl_half maxmag(s::cl_half x, s::cl_half y) __NOEXC
s::cl_float native_divide(s::cl_float x, s::cl_float y) __NOEXC
s::cl_half asinpi(s::cl_half x) __NOEXC
s::cl_half tan(s::cl_half x) __NOEXC
s::cl_float native_cos(s::cl_float x) __NOEXC
s::cl_half minmag(s::cl_half x, s::cl_half y) __NOEXC
s::cl_float half_recip(s::cl_float x) __NOEXC
s::cl_half log10(s::cl_half x) __NOEXC
s::cl_half mad(s::cl_half a, s::cl_half b, s::cl_half c) __NOEXC
s::cl_float native_exp(s::cl_float x) __NOEXC
#define MAKE_1V_2V(Fun, Ret, Arg1, Arg2)
s::cl_half pow(s::cl_half x, s::cl_half y) __NOEXC
s::cl_float native_log2(s::cl_float x) __NOEXC
s::cl_float half_sin(s::cl_float x) __NOEXC
s::cl_half cosh(s::cl_half x) __NOEXC
s::cl_float half_exp(s::cl_float x) __NOEXC
s::cl_half rsqrt(s::cl_half x) __NOEXC
s::cl_half fmod(s::cl_half x, s::cl_half y) __NOEXC
s::cl_half atan(s::cl_half x) __NOEXC
s::cl_half hypot(s::cl_half x, s::cl_half y) __NOEXC
s::cl_half log(s::cl_half x) __NOEXC
s::cl_half fma(s::cl_half a, s::cl_half b, s::cl_half c) __NOEXC
s::cl_half atanh(s::cl_half x) __NOEXC
s::cl_half lgamma(s::cl_half x) __NOEXC
s::cl_half asinh(s::cl_half x) __NOEXC
s::cl_float half_exp2(s::cl_float x) __NOEXC
s::cl_half powr(s::cl_half x, s::cl_half y) __NOEXC
#define MAKE_1V_2P(Fun, Ret, Arg1, Arg2)
detail::enable_if_t< detail::is_genfloat< T >::value, T > abs(T x) __NOEXC
s::cl_half logb(s::cl_half x) __NOEXC
s::cl_half modf(s::cl_half x, s::cl_half *iptr) __NOEXC
s::cl_half atanpi(s::cl_half x) __NOEXC
s::cl_half acospi(s::cl_half x) __NOEXC
s::cl_half pown(s::cl_half x, s::cl_int y) __NOEXC
s::cl_half erf(s::cl_half x) __NOEXC
s::cl_half sincos(s::cl_half x, s::cl_half *cosval) __NOEXC
We provide new interfaces for matrix muliply in this patch:
detail::common_rel_ret_t< T > signbit(T x) __NOEXC
s::cl_half trunc(s::cl_half x) __NOEXC
s::cl_half ldexp(s::cl_half x, s::cl_int k) __NOEXC
s::cl_float half_log2(s::cl_float x) __NOEXC
s::cl_float native_rsqrt(s::cl_float x) __NOEXC
s::cl_half erfc(s::cl_half x) __NOEXC
s::cl_half round(s::cl_half x) __NOEXC
s::cl_half acos(s::cl_half x) __NOEXC
s::cl_half log1p(s::cl_half x) __NOEXC
s::cl_float half_rsqrt(s::cl_float x) __NOEXC
s::cl_half sinpi(s::cl_half x) __NOEXC
s::cl_float half_log10(s::cl_float x) __NOEXC
s::cl_half nextafter(s::cl_half x, s::cl_half y) __NOEXC
s::cl_half exp(s::cl_half x) __NOEXC
s::cl_float native_powr(s::cl_float x, s::cl_float y) __NOEXC
s::cl_half remainder(s::cl_half x, s::cl_half y) __NOEXC
s::cl_half sin(s::cl_half x) __NOEXC
s::cl_float native_log10(s::cl_float x) __NOEXC
s::cl_half fmax(s::cl_half x, s::cl_half y) __NOEXC
s::cl_half sinh(s::cl_half x) __NOEXC
s::cl_half frexp(s::cl_half x, s::cl_int *exp) __NOEXC
s::cl_half fmin(s::cl_half x, s::cl_half y) __NOEXC
s::cl_half fdim(s::cl_half x, s::cl_half y) __NOEXC
s::cl_float half_powr(s::cl_float x, s::cl_float y) __NOEXC
s::cl_half log2(s::cl_half x) __NOEXC
s::cl_float native_exp2(s::cl_float x) __NOEXC
s::cl_half atan2pi(s::cl_half x, s::cl_half y) __NOEXC
#define MAKE_1V(Fun, Ret, Arg1)
s::cl_half acosh(s::cl_half x) __NOEXC
s::cl_half copysign(s::cl_half x, s::cl_half y) __NOEXC
#define MAKE_1V_2V_3P(Fun, Ret, Arg1, Arg2, Arg3)
s::cl_float half_log(s::cl_float x) __NOEXC
s::cl_half ceil(s::cl_half x) __NOEXC
s::cl_float half_cos(s::cl_float x) __NOEXC
s::cl_half floor(s::cl_half x) __NOEXC
s::cl_float native_log(s::cl_float x) __NOEXC
s::cl_half nan(s::cl_ushort nancode) __NOEXC
s::cl_half atan2(s::cl_half x, s::cl_half y) __NOEXC
s::cl_half remquo(s::cl_half x, s::cl_half y, s::cl_int *quo) __NOEXC
s::cl_half expm1(s::cl_half x) __NOEXC
s::cl_half cos(s::cl_half x) __NOEXC
s::cl_half exp10(s::cl_half x) __NOEXC
s::cl_half fabs(s::cl_half x) __NOEXC
#define __SYCL_INLINE_NAMESPACE(X)
s::cl_float native_exp10(s::cl_float x) __NOEXC