10 #ifndef __CLANG_HIP_MATH_H__
11 #define __CLANG_HIP_MATH_H__
18 #pragma push_macro("__DEVICE__")
19 #pragma push_macro("__RETURN_TYPE")
22 #define __DEVICE__ static __device__
23 #define __RETURN_TYPE bool
31 if (__tmp >=
'0' && __tmp <=
'7')
32 __r = (__r * 8u) + __tmp -
'0';
48 if (__tmp >=
'0' && __tmp <=
'9')
49 __r = (__r * 10u) + __tmp -
'0';
65 if (__tmp >=
'0' && __tmp <=
'9')
66 __r = (__r * 16u) + __tmp -
'0';
67 else if (__tmp >=
'a' && __tmp <=
'f')
68 __r = (__r * 16u) + __tmp -
'a' + 10;
69 else if (__tmp >=
'A' && __tmp <=
'F')
70 __r = (__r * 16u) + __tmp -
'A' + 10;
88 if (*__tagp ==
'x' || *__tagp ==
'X')
99 inline float abs(
float __x) {
return __ocml_fabs_f32(
__x); }
120 return __ocml_copysign_f32(
__x,
__y);
160 return __ocml_fma_f32(
__x,
__y, __z);
204 for (
int __i = 1; __i < __n; ++__i) {
205 float __x2 = (2 * __i) /
__x * __x1 - __x0;
213 inline float ldexpf(
float __x,
int __e) {
return __ocml_ldexp_f32(
__x, __e); }
244 inline float nanf(
const char *__tagp) {
257 __tmp.bits.sign = 0u;
258 __tmp.bits.exponent = ~0u;
259 __tmp.bits.quiet = 1u;
268 return __ocml_nextafter_f32(
__x,
__y);
272 return __ocml_len3_f32(
__x,
__y, __z);
276 return __ocml_len4_f32(
__x,
__y, __z, __w);
292 return __ocml_sqrt_f32(__r);
300 return __ocml_remainder_f32(
__x,
__y);
313 return __ocml_rhypot_f32(
__x,
__y);
319 return __ocml_rlen3_f32(
__x,
__y, __z);
324 return __ocml_rlen4_f32(
__x,
__y, __z, __w);
336 return __ocml_rsqrt_f32(__r);
344 return (__n <
INT_MAX) ? __ocml_scalbn_f32(
__x, __n)
345 : __ocml_scalb_f32(
__x, __n);
348 inline float scalbnf(
float __x,
int __n) {
return __ocml_scalbn_f32(
__x, __n); }
352 inline void sincosf(
float __x,
float *__sinptr,
float *__cosptr) {
401 for (
int __i = 1; __i < __n; ++__i) {
402 float __x2 = (2 * __i) /
__x * __x1 - __x0;
417 #if defined OCML_BASIC_ROUNDED_OPERATIONS
420 return __ocml_add_rtn_f32(
__x,
__y);
425 #if defined OCML_BASIC_ROUNDED_OPERATIONS
428 return __ocml_add_rtp_f32(
__x,
__y);
432 return __ocml_add_rtz_f32(
__x,
__y);
436 return __ocml_div_rtn_f32(
__x,
__y);
441 #if defined OCML_BASIC_ROUNDED_OPERATIONS
444 return __ocml_div_rtp_f32(
__x,
__y);
448 return __ocml_div_rtz_f32(
__x,
__y);
453 #if defined OCML_BASIC_ROUNDED_OPERATIONS
456 return __ocml_fma_rtn_f32(
__x,
__y, __z);
461 return __ocml_fma_f32(
__x,
__y, __z);
463 #if defined OCML_BASIC_ROUNDED_OPERATIONS
466 return __ocml_fma_rtp_f32(
__x,
__y, __z);
470 return __ocml_fma_rtz_f32(
__x,
__y, __z);
474 return __ocml_mul_rtn_f32(
__x,
__y);
479 #if defined OCML_BASIC_ROUNDED_OPERATIONS
482 return __ocml_mul_rtp_f32(
__x,
__y);
486 return __ocml_mul_rtz_f32(
__x,
__y);
489 inline float __frcp_rd(
float __x) {
return __llvm_amdgcn_rcp_f32(
__x); }
493 #if defined OCML_BASIC_ROUNDED_OPERATIONS
495 inline float __frcp_ru(
float __x) {
return __llvm_amdgcn_rcp_f32(
__x); }
497 inline float __frcp_rz(
float __x) {
return __llvm_amdgcn_rcp_f32(
__x); }
501 #if defined OCML_BASIC_ROUNDED_OPERATIONS
507 #if defined OCML_BASIC_ROUNDED_OPERATIONS
514 return __ocml_sub_rtn_f32(
__x,
__y);
519 #if defined OCML_BASIC_ROUNDED_OPERATIONS
522 return __ocml_sub_rtp_f32(
__x,
__y);
526 return __ocml_sub_rtz_f32(
__x,
__y);
539 return (
__x < 0) ? 0 : ((
__x > 1) ? 1 :
__x);
555 inline double abs(
double __x) {
return __ocml_fabs_f64(
__x); }
557 inline double acos(
double __x) {
return __ocml_acos_f64(
__x); }
561 inline double asin(
double __x) {
return __ocml_asin_f64(
__x); }
565 inline double atan(
double __x) {
return __ocml_atan_f64(
__x); }
568 return __ocml_atan2_f64(
__x,
__y);
573 inline double cbrt(
double __x) {
return __ocml_cbrt_f64(
__x); }
575 inline double ceil(
double __x) {
return __ocml_ceil_f64(
__x); }
578 return __ocml_copysign_f64(
__x,
__y);
583 inline double cosh(
double __x) {
return __ocml_cosh_f64(
__x); }
591 inline double erf(
double __x) {
return __ocml_erf_f64(
__x); }
593 inline double erfc(
double __x) {
return __ocml_erfc_f64(
__x); }
601 inline double exp(
double __x) {
return __ocml_exp_f64(
__x); }
605 inline double exp2(
double __x) {
return __ocml_exp2_f64(
__x); }
609 inline double fabs(
double __x) {
return __ocml_fabs_f64(
__x); }
616 return __ocml_fma_f64(
__x,
__y, __z);
635 return __ocml_hypot_f64(
__x,
__y);
650 inline double jn(
int __n,
663 for (
int __i = 1; __i < __n; ++__i) {
664 double __x2 = (2 * __i) /
__x * __x1 - __x0;
672 inline double ldexp(
double __x,
int __e) {
return __ocml_ldexp_f64(
__x, __e); }
676 inline long long int llrint(
double __x) {
return __ocml_rint_f64(
__x); }
680 inline double log(
double __x) {
return __ocml_log_f64(
__x); }
686 inline double log2(
double __x) {
return __ocml_log2_f64(
__x); }
688 inline double logb(
double __x) {
return __ocml_logb_f64(
__x); }
690 inline long int lrint(
double __x) {
return __ocml_rint_f64(
__x); }
694 inline double modf(
double __x,
double *__iptr) {
703 inline double nan(
const char *__tagp) {
716 __tmp.bits.sign = 0u;
717 __tmp.bits.exponent = ~0u;
718 __tmp.bits.quiet = 1u;
726 return *
reinterpret_cast<double *
>(&val);
733 return __ocml_nextafter_f64(
__x,
__y);
745 return __ocml_sqrt_f64(__r);
749 return __ocml_len3_f64(
__x,
__y, __z);
753 return __ocml_len4_f64(
__x,
__y, __z, __w);
765 return __ocml_remainder_f64(
__x,
__y);
778 return __ocml_rhypot_f64(
__x,
__y);
781 inline double rint(
double __x) {
return __ocml_rint_f64(
__x); }
792 return __ocml_rsqrt_f64(__r);
796 return __ocml_rlen3_f64(
__x,
__y, __z);
800 return __ocml_rlen4_f64(
__x,
__y, __z, __w);
808 return (__n <
INT_MAX) ? __ocml_scalbn_f64(
__x, __n)
809 : __ocml_scalb_f64(
__x, __n);
813 return __ocml_scalbn_f64(
__x, __n);
820 inline void sincos(
double __x,
double *__sinptr,
double *__cosptr) {
827 inline void sincospi(
double __x,
double *__sinptr,
double *__cosptr) {
834 inline double sinh(
double __x) {
return __ocml_sinh_f64(
__x); }
838 inline double sqrt(
double __x) {
return __ocml_sqrt_f64(
__x); }
842 inline double tanh(
double __x) {
return __ocml_tanh_f64(
__x); }
852 inline double yn(
int __n,
865 for (
int __i = 1; __i < __n; ++__i) {
866 double __x2 = (2 * __i) /
__x * __x1 - __x0;
875 #if defined OCML_BASIC_ROUNDED_OPERATIONS
878 return __ocml_add_rtn_f64(
__x,
__y);
883 #if defined OCML_BASIC_ROUNDED_OPERATIONS
886 return __ocml_add_rtp_f64(
__x,
__y);
890 return __ocml_add_rtz_f64(
__x,
__y);
894 return __ocml_div_rtn_f64(
__x,
__y);
899 #if defined OCML_BASIC_ROUNDED_OPERATIONS
902 return __ocml_div_rtp_f64(
__x,
__y);
906 return __ocml_div_rtz_f64(
__x,
__y);
910 return __ocml_mul_rtn_f64(
__x,
__y);
915 #if defined OCML_BASIC_ROUNDED_OPERATIONS
918 return __ocml_mul_rtp_f64(
__x,
__y);
922 return __ocml_mul_rtz_f64(
__x,
__y);
925 inline double __drcp_rd(
double __x) {
return __llvm_amdgcn_rcp_f64(
__x); }
929 #if defined OCML_BASIC_ROUNDED_OPERATIONS
931 inline double __drcp_ru(
double __x) {
return __llvm_amdgcn_rcp_f64(
__x); }
933 inline double __drcp_rz(
double __x) {
return __llvm_amdgcn_rcp_f64(
__x); }
939 #if defined OCML_BASIC_ROUNDED_OPERATIONS
946 return __ocml_sub_rtn_f64(
__x,
__y);
951 #if defined OCML_BASIC_ROUNDED_OPERATIONS
954 return __ocml_sub_rtp_f64(
__x,
__y);
958 return __ocml_sub_rtz_f64(
__x,
__y);
962 return __ocml_fma_rtn_f64(
__x,
__y, __z);
967 return __ocml_fma_f64(
__x,
__y, __z);
969 #if defined OCML_BASIC_ROUNDED_OPERATIONS
972 return __ocml_fma_rtp_f64(
__x,
__y, __z);
976 return __ocml_fma_rtz_f64(
__x,
__y, __z);
986 return (
__x ^ __sgn) - __sgn;
991 return (
__x ^ __sgn) - __sgn;
995 long long __sgn =
__x >> (
sizeof(
long long) *
CHAR_BIT - 1);
996 return (
__x ^ __sgn) - __sgn;
999 #if defined(__cplusplus)
1009 return __ocml_fma_f16(
__x,
__y, __z);
1017 #pragma push_macro("__DEF_FUN1")
1018 #pragma push_macro("__DEF_FUN2")
1019 #pragma push_macro("__DEF_FUNI")
1020 #pragma push_macro("__DEF_FLOAT_FUN2I")
1021 #pragma push_macro("__HIP_OVERLOAD1")
1022 #pragma push_macro("__HIP_OVERLOAD2")
1032 #define __HIP_OVERLOAD1(__retty, __fn) \
1033 template <typename __T> \
1034 __DEVICE__ typename __hip_enable_if<std::numeric_limits<__T>::is_integer, \
1037 return ::__fn((double)__x); \
1043 #define __HIP_OVERLOAD2(__retty, __fn) \
1044 template <typename __T1, typename __T2> \
1046 typename __hip_enable_if<std::numeric_limits<__T1>::is_specialized && \
1047 std::numeric_limits<__T2>::is_specialized, \
1049 __fn(__T1 __x, __T2 __y) { \
1050 return __fn((double)__x, (double)__y); \
1054 #define __DEF_FUN1(__retty, __func) \
1056 inline float __func(float __x) { return __func##f(__x); } \
1057 __HIP_OVERLOAD1(__retty, __func)
1060 #define __DEF_FUNI(__retty, __func) \
1062 inline __retty __func(float __x) { return __func##f(__x); } \
1063 __HIP_OVERLOAD1(__retty, __func)
1066 #define __DEF_FUN2(__retty, __func) \
1068 inline float __func(float __x, float __y) { return __func##f(__x, __y); } \
1069 __HIP_OVERLOAD2(__retty, __func)
1133 #define __DEF_FLOAT_FUN2I(__func) \
1135 inline float __func(float __x, int __y) { return __func##f(__x, __y); }
1139 return (__arg1 < __arg2) ? __arg1 : __arg2;
1143 return (__arg1 > __arg2) ? __arg1 : __arg2;
1147 return (__arg1 < __arg2) ? __arg1 : __arg2;
1150 return (__arg1 > __arg2) ? __arg1 : __arg2;
1168 __host__
inline static int min(
int __arg1,
int __arg2) {
1172 __host__
inline static int max(
int __arg1,
int __arg2) {
1176 #pragma pop_macro("__DEF_FUN1")
1177 #pragma pop_macro("__DEF_FUN2")
1178 #pragma pop_macro("__DEF_FUNI")
1179 #pragma pop_macro("__DEF_FLOAT_FUN2I")
1180 #pragma pop_macro("__HIP_OVERLOAD1")
1181 #pragma pop_macro("__HIP_OVERLOAD2")
1182 #pragma pop_macro("__DEVICE__")
1183 #pragma pop_macro("__RETURN_TYPE")
#define static_assert(x, y)
__DEVICE__ bool isunordered(float __x, float __y)
Test if arguments are unordered.
__DEVICE__ bool isgreater(float __x, float __y)
Returns the component-wise compare of x > y.
__DEVICE__ bool islessgreater(float __x, float __y)
Returns the component-wise compare of (x < y) || (x > y) .
__DEVICE__ bool islessequal(float __x, float __y)
Returns the component-wise compare of x <= y.
__DEVICE__ bool isless(float __x, float __y)
Returns the component-wise compare of x < y.
__DEVICE__ bool isgreaterequal(float __x, float __y)
Returns the component-wise compare of x >= y.
__DEVICE__ float __fsqrt_rd(float __a)
__DEVICE__ float __fdiv_rd(float __a, float __b)
__DEVICE__ double __dsub_ru(double __a, double __b)
__DEVICE__ double __drcp_ru(double __a)
__DEVICE__ float __frcp_rz(float __a)
__DEVICE__ float __fmul_ru(float __a, float __b)
__DEVICE__ double __dsub_rd(double __a, double __b)
__DEVICE__ float __frcp_ru(float __a)
__DEVICE__ float __frcp_rd(float __a)
__DEVICE__ double __dmul_ru(double __a, double __b)
__DEVICE__ float __fmaf_ru(float __a, float __b, float __c)
__DEVICE__ double __fma_rz(double __a, double __b, double __c)
__DEVICE__ double __fma_rd(double __a, double __b, double __c)
__DEVICE__ double __dmul_rd(double __a, double __b)
__DEVICE__ double __ddiv_ru(double __a, double __b)
__DEVICE__ double __ddiv_rd(double __a, double __b)
__DEVICE__ double __dadd_ru(double __a, double __b)
__DEVICE__ float __fmul_rd(float __a, float __b)
__DEVICE__ float __fsub_rd(float __a, float __b)
__DEVICE__ float __fsub_rz(float __a, float __b)
__DEVICE__ double __fma_ru(double __a, double __b, double __c)
__DEVICE__ double __dsqrt_ru(double __a)
__DEVICE__ float __fsqrt_rz(float __a)
__DEVICE__ double __dsub_rz(double __a, double __b)
__DEVICE__ float __fadd_rd(float __a, float __b)
__DEVICE__ float __fmul_rz(float __a, float __b)
__DEVICE__ float __fadd_rz(float __a, float __b)
__DEVICE__ double __dsqrt_rd(double __a)
__DEVICE__ float __fmaf_rd(float __a, float __b, float __c)
__DEVICE__ double __dadd_rd(double __a, double __b)
__DEVICE__ double __dsqrt_rz(double __a)
__DEVICE__ double __drcp_rd(double __a)
__DEVICE__ float __fdiv_rz(float __a, float __b)
__DEVICE__ float __fmaf_rz(float __a, float __b, float __c)
__DEVICE__ double __drcp_rz(double __a)
__DEVICE__ float __fsub_ru(float __a, float __b)
__DEVICE__ double __dmul_rz(double __a, double __b)
__DEVICE__ float __fsqrt_ru(float __a)
__DEVICE__ float __fadd_ru(float __a, float __b)
__DEVICE__ float __fdiv_ru(float __a, float __b)
__DEVICE__ double __ddiv_rz(double __a, double __b)
__DEVICE__ double __dadd_rz(double __a, double __b)
__device__ double __ocml_i0_f64(double)
__device__ float __ocml_j1_f32(float)
__device__ double __ocml_remquo_f64(double, double, __attribute__((address_space(5))) int *)
__device__ double __ocml_modf_f64(double, __attribute__((address_space(5))) double *)
__device__ float __ocml_cospi_f32(float)
__device__ float __ocml_i0_f32(float)
__device__ double __ocml_lgamma_f64(double)
__device__ float __ocml_sincos_f32(float, __attribute__((address_space(5))) float *)
__device__ float __ocml_remquo_f32(float, float, __attribute__((address_space(5))) int *)
_Float16 __2f16 __attribute__((ext_vector_type(2)))
Zeroes the upper 128 bits (bits 255:128) of all YMM registers.
__device__ float __ocml_y0_f32(float)
__device__ float __ocml_modf_f32(float, __attribute__((address_space(5))) float *)
__device__ float __ocml_i1_f32(float)
__device__ float __ocml_lgamma_f32(float)
__device__ float __ocml_frexp_f32(float, __attribute__((address_space(5))) int *)
__device__ double __ocml_sinpi_f64(double)
__device__ double __ocml_cospi_f64(double)
__device__ double __ocml_frexp_f64(double, __attribute__((address_space(5))) int *)
__device__ double __ocml_tgamma_f64(double)
__device__ float __ocml_tan_f32(float)
__device__ float __ocml_tgamma_f32(float)
__device__ double __ocml_sincos_f64(double, __attribute__((address_space(5))) double *)
__device__ float __ocml_sinpi_f32(float)
__device__ double __ocml_j1_f64(double)
__device__ double __ocml_y1_f64(double)
__device__ double __ocml_j0_f64(double)
__device__ float __ocml_cos_f32(float)
__device__ float __ocml_y1_f32(float)
__device__ float __ocml_j0_f32(float)
__device__ double __ocml_cos_f64(double)
__device__ double __ocml_i1_f64(double)
__device__ double __ocml_sin_f64(double)
__device__ double __ocml_sincospi_f64(double, __attribute__((address_space(5))) double *)
__device__ float __ocml_sin_f32(float)
__device__ float __ocml_sincospi_f32(float, __attribute__((address_space(5))) float *)
__device__ float __ocml_native_sin_f32(float)
__device__ float __ocml_native_cos_f32(float)
__device__ double __ocml_y0_f64(double)
__device__ double __ocml_tan_f64(double)
__DEVICE__ double __dsub_rn(double __x, double __y)
__DEVICE__ double log2(double __x)
__DEVICE__ float sinpif(float __x)
__DEVICE__ float tanf(float __x)
__DEVICE__ float log2f(float __x)
__DEVICE__ float y0f(float __x)
__DEVICE__ float tanhf(float __x)
__DEVICE__ float coshf(float __x)
__DEVICE__ float log10f(float __x)
#define __HIP_OVERLOAD2(__retty, __fn)
__DEVICE__ float j1f(float __x)
__DEVICE__ float ldexpf(float __x, int __e)
__DEVICE__ long long int llroundf(float __x)
__DEVICE__ double ceil(double __x)
__DEVICE__ double atan2(double __x, double __y)
__DEVICE__ double rhypot(double __x, double __y)
__DEVICE__ double normcdfinv(double __x)
__DEVICE__ double norm3d(double __x, double __y, double __z)
__DEVICE__ float truncf(float __x)
__DEVICE__ float remainderf(float __x, float __y)
__DEVICE__ float fabsf(float __x)
__DEVICE__ double log(double __x)
__DEVICE__ float __fdiv_rn(float __x, float __y)
__DEVICE__ float scalbnf(float __x, int __n)
__DEVICE__ float cyl_bessel_i0f(float __x)
__DEVICE__ float lgammaf(float __x)
__DEVICE__ float cospif(float __x)
#define __DEF_FUNI(__retty, __func)
__DEVICE__ double cbrt(double __x)
__DEVICE__ double __dsqrt_rn(double __x)
__DEVICE__ float frexpf(float __x, int *__nptr)
__DEVICE__ double ldexp(double __x, int __e)
__DEVICE__ float tgammaf(float __x)
__DEVICE__ double fmax(double __x, double __y)
__DEVICE__ double cosh(double __x)
__DEVICE__ double tgamma(double __x)
__DEVICE__ float __sinf(float __x)
__DEVICE__ float erfinvf(float __x)
__DEVICE__ float modff(float __x, float *__iptr)
__DEVICE__ double sinh(double __x)
__DEVICE__ double erfinv(double __x)
__DEVICE__ double fdim(double __x, double __y)
__DEVICE__ long int lrint(double __x)
__DEVICE__ float expm1f(float __x)
#define __DEF_FUN2(__retty, __func)
__DEVICE__ float sinhf(float __x)
__DEVICE__ double j0(double __x)
__DEVICE__ double exp(double __x)
__DEVICE__ float y1f(float __x)
__DEVICE__ float acosf(float __x)
__DEVICE__ float fmaf(float __x, float __y, float __z)
__DEVICE__ float cyl_bessel_i1f(float __x)
__DEVICE__ float fmodf(float __x, float __y)
__DEVICE__ float log1pf(float __x)
__DEVICE__ float atan2f(float __x, float __y)
__DEVICE__ float copysignf(float __x, float __y)
__DEVICE__ double j1(double __x)
__DEVICE__ long labs(long __x)
__DEVICE__ float rnormf(int __dim, const float *__a)
#define __DEF_FLOAT_FUN2I(__func)
__DEVICE__ float rnorm4df(float __x, float __y, float __z, float __w)
__DEVICE__ float __cosf(float __x)
__DEVICE__ double cos(double __x)
__DEVICE__ float erff(float __x)
__DEVICE__ float atanf(float __x)
__DEVICE__ float rnorm3df(float __x, float __y, float __z)
__DEVICE__ double norm(int __dim, const double *__a)
__DEVICE__ float erfcxf(float __x)
__DEVICE__ float erfcinvf(float __x)
__DEVICE__ float asinf(float __x)
__DEVICE__ float abs(float __x)
__DEVICE__ double sin(double __x)
__DEVICE__ double tan(double __x)
__DEVICE__ long int lroundf(float __x)
__DEVICE__ double hypot(double __x, double __y)
__DEVICE__ double fmin(double __x, double __y)
__DEVICE__ float __fdividef(float __x, float __y)
__DEVICE__ float __frsqrt_rn(float __x)
__DEVICE__ float __log2f(float __x)
__DEVICE__ float norm4df(float __x, float __y, float __z, float __w)
__DEVICE__ double jn(int __n, double __x)
__DEVICE__ __RETURN_TYPE signbit(float __x)
Test for sign bit.
__DEVICE__ long int lround(double __x)
__DEVICE__ double tanh(double __x)
#define __HIP_OVERLOAD1(__retty, __fn)
__DEVICE__ double copysign(double __x, double __y)
__DEVICE__ float __exp10f(float __x)
__DEVICE__ float __frcp_rn(float __x)
__DEVICE__ double frexp(double __x, int *__nptr)
__DEVICE__ float ynf(int __n, float __x)
__DEVICE__ float powf(float __x, float __y)
__DEVICE__ float __fsub_rn(float __x, float __y)
__DEVICE__ double acosh(double __x)
__DEVICE__ double scalbln(double __x, long int __n)
__DEVICE__ double rint(double __x)
__DEVICE__ double __dadd_rn(double __x, double __y)
__DEVICE__ double logb(double __x)
__DEVICE__ double atan(double __x)
__DEVICE__ float sinf(float __x)
__DEVICE__ float __tanf(float __x)
__DEVICE__ float remquof(float __x, float __y, int *__quo)
__DEVICE__ uint64_t __make_mantissa_base8(const char *__tagp)
__DEVICE__ double normcdf(double __x)
__DEVICE__ float __fsqrt_rn(float __x)
__DEVICE__ float hypotf(float __x, float __y)
__DEVICE__ float __fmaf_rn(float __x, float __y, float __z)
__DEVICE__ void sincosf(float __x, float *__sinptr, float *__cosptr)
__DEVICE__ double fma(double __x, double __y, double __z)
__DEVICE__ double erfc(double __x)
__DEVICE__ float exp10f(float __x)
__DEVICE__ double y1(double __x)
__DEVICE__ float fmaxf(float __x, float __y)
__DEVICE__ float fminf(float __x, float __y)
__DEVICE__ double asin(double __x)
__DEVICE__ double erfcinv(double __x)
__DEVICE__ float logf(float __x)
__DEVICE__ float __fadd_rn(float __x, float __y)
__DEVICE__ double nextafter(double __x, double __y)
__DEVICE__ double cospi(double __x)
__DEVICE__ uint64_t __make_mantissa(const char *__tagp)
__DEVICE__ double rsqrt(double __x)
__DEVICE__ double pow(double __x, double __y)
__DEVICE__ float erfcf(float __x)
__DEVICE__ float atanhf(float __x)
__DEVICE__ float asinhf(float __x)
__DEVICE__ float __expf(float __x)
__DEVICE__ double norm4d(double __x, double __y, double __z, double __w)
__DEVICE__ double remquo(double __x, double __y, int *__quo)
__DEVICE__ float __logf(float __x)
__DEVICE__ double __fma_rn(double __x, double __y, double __z)
__DEVICE__ double nan(const char *__tagp)
__DEVICE__ double rnorm(int __dim, const double *__a)
__DEVICE__ float j0f(float __x)
__DEVICE__ float rsqrtf(float __x)
__DEVICE__ T max(T __arg1, T __arg2)
__DEVICE__ float jnf(int __n, float __x)
__DEVICE__ double sinpi(double __x)
__DEVICE__ double fmod(double __x, double __y)
__DEVICE__ float logbf(float __x)
__DEVICE__ double y0(double __x)
__DEVICE__ double sqrt(double __x)
__DEVICE__ double acos(double __x)
__DEVICE__ T min(T __arg1, T __arg2)
__DEVICE__ __RETURN_TYPE isinf(float __x)
Test for infinity value (+ve or -ve) .
__DEVICE__ void __sincosf(float __x, float *__sinptr, float *__cosptr)
__DEVICE__ double lgamma(double __x)
__DEVICE__ double yn(int __n, double __x)
__DEVICE__ float rhypotf(float __x, float __y)
__DEVICE__ float exp2f(float __x)
__DEVICE__ double log10(double __x)
__DEVICE__ double cyl_bessel_i0(double __x)
__DEVICE__ double scalbn(double __x, int __n)
__DEVICE__ double __ddiv_rn(double __x, double __y)
__DEVICE__ double cyl_bessel_i1(double __x)
__DEVICE__ uint64_t __make_mantissa_base16(const char *__tagp)
__DEVICE__ float ceilf(float __x)
__DEVICE__ double rcbrt(double __x)
__DEVICE__ double rnorm3d(double __x, double __y, double __z)
__DEVICE__ float normcdfinvf(float __x)
__DEVICE__ double nearbyint(double __x)
__DEVICE__ float norm3df(float __x, float __y, float __z)
__DEVICE__ long long int llround(double __x)
__DEVICE__ void sincos(double __x, double *__sinptr, double *__cosptr)
__DEVICE__ double round(double __x)
__DEVICE__ long long int llrint(double __x)
__DEVICE__ __RETURN_TYPE isnan(float __x)
Test for a NaN.
__DEVICE__ float fdimf(float __x, float __y)
__DEVICE__ double __dmul_rn(double __x, double __y)
#define __DEF_FUN1(__retty, __func)
__DEVICE__ float normf(int __dim, const float *__a)
__DEVICE__ float nearbyintf(float __x)
__DEVICE__ int ilogbf(float __x)
__DEVICE__ float floorf(float __x)
__DEVICE__ long long llabs(long long __x)
__DEVICE__ double remainder(double __x, double __y)
__DEVICE__ float sqrtf(float __x)
__DEVICE__ float roundf(float __x)
__DEVICE__ void sincospif(float __x, float *__sinptr, float *__cosptr)
__DEVICE__ double __drcp_rn(double __x)
__DEVICE__ uint64_t __make_mantissa_base10(const char *__tagp)
__DEVICE__ double fabs(double __x)
__DEVICE__ long int lrintf(float __x)
__DEVICE__ float acoshf(float __x)
__DEVICE__ double modf(double __x, double *__iptr)
__DEVICE__ __RETURN_TYPE isfinite(float __x)
Test for finite value.
__DEVICE__ float cosf(float __x)
__DEVICE__ float expf(float __x)
__DEVICE__ float nextafterf(float __x, float __y)
__DEVICE__ double rnorm4d(double __x, double __y, double __z, double __w)
__DEVICE__ int ilogb(double __x)
__DEVICE__ double floor(double __x)
__DEVICE__ long long int llrintf(float __x)
__DEVICE__ double erfcx(double __x)
__DEVICE__ float fdividef(float __x, float __y)
__DEVICE__ double atanh(double __x)
__DEVICE__ double erf(double __x)
__DEVICE__ float rcbrtf(float __x)
__DEVICE__ double exp10(double __x)
__DEVICE__ float __log10f(float __x)
__DEVICE__ float cbrtf(float __x)
__DEVICE__ float nanf(const char *__tagp)
__DEVICE__ float __fmul_rn(float __x, float __y)
__DEVICE__ void sincospi(double __x, double *__sinptr, double *__cosptr)
__DEVICE__ float scalblnf(float __x, long int __n)
__DEVICE__ float rintf(float __x)
__DEVICE__ double log1p(double __x)
__DEVICE__ float normcdff(float __x)
__DEVICE__ double expm1(double __x)
__DEVICE__ double exp2(double __x)
__DEVICE__ float __saturatef(float __x)
__DEVICE__ double trunc(double __x)
__DEVICE__ double asinh(double __x)
__DEVICE__ float __powf(float __x, float __y)
static __inline unsigned char unsigned int __x
static __inline unsigned char unsigned int unsigned int __y
static __inline__ uint32_t
static __inline__ uint64_t
static __inline__ void int __a
float __ovld __cnfn sign(float x)
Returns 1.0 if x > 0, -0.0 if x = -0.0, +0.0 if x = +0.0, or -1.0 if x < 0.