[LVI] Add trunc to i1 handling. (#124480)
[llvm-project.git] / libclc / r600 / lib / math / rsqrt.cl
blob53f7d4040463fbaaec13ed2d7e54a849bcce073e
1 #include <clc/clc.h>
2 #include <clc/clcmacro.h>
4 _CLC_OVERLOAD _CLC_DEF float rsqrt(float x)
6 return __builtin_r600_recipsqrt_ieeef(x);
9 _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, rsqrt, float);
11 #ifdef cl_khr_fp64
13 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
15 _CLC_OVERLOAD _CLC_DEF double rsqrt(double x)
17 return __builtin_r600_recipsqrt_ieee(x);
20 _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, rsqrt, double);
22 #endif