[X86] Better handling of impossibly large stack frames (#124217)
[llvm-project.git] / libclc / generic / lib / math / rsqrt.cl
blobb38d4a1c3cc82cd4919b05c7c4c26f6abfe7c974
1 #include <clc/clc.h>
2 #include <clc/clcmacro.h>
4 _CLC_OVERLOAD _CLC_DEF float rsqrt(float x)
6 return 1.0f / sqrt(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 1.0 / sqrt(x);
20 _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, rsqrt, double);
22 #endif