blob: 131ffc194a90f4e9ff9d4249fd048b900580ebf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <clc/clc.h>
#include "../clcmacro.h"
_CLC_OVERLOAD _CLC_DEF float rsqrt(float x)
{
return 1.0f / sqrt(x);
}
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, rsqrt, float);
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
_CLC_OVERLOAD _CLC_DEF double rsqrt(double x)
{
return 1.0 / sqrt(x);
}
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, rsqrt, double);
#endif
|