[SampleProfileLoader] Fix integer overflow in generateMDProfMetadata (#90217)
[llvm-project.git] / libclc / generic / lib / math / rsqrt.cl
blob131ffc194a90f4e9ff9d4249fd048b900580ebf0
1 #include <clc/clc.h>
3 #include "../clcmacro.h"
5 _CLC_OVERLOAD _CLC_DEF float rsqrt(float x)
7 return 1.0f / sqrt(x);
10 _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, rsqrt, float);
12 #ifdef cl_khr_fp64
14 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
16 _CLC_OVERLOAD _CLC_DEF double rsqrt(double x)
18 return 1.0 / sqrt(x);
21 _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, rsqrt, double);
23 #endif