File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
libclc/clc/lib/amdgpu/math Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 23
23
#include <clc/clcmacro.h>
24
24
#include <clc/internal/clc.h>
25
25
#include <clc/math/clc_fma.h>
26
+ #include <clc/math/clc_ldexp.h>
26
27
27
28
#ifdef cl_khr_fp64
28
29
@@ -39,7 +40,7 @@ _CLC_OVERLOAD _CLC_DEF double __clc_sqrt(double x) {
39
40
uint exp0 = vcc ? 0x100 : 0 ;
40
41
unsigned exp1 = vcc ? 0xffffff80 : 0 ;
41
42
42
- double v01 = __builtin_ldexp (x , exp0 );
43
+ double v01 = __clc_ldexp (x , exp0 );
43
44
double v23 = __clc_builtin_rsq (v01 );
44
45
double v45 = v01 * v23 ;
45
46
v23 = v23 * 0.5 ;
@@ -52,7 +53,7 @@ _CLC_OVERLOAD _CLC_DEF double __clc_sqrt(double x) {
52
53
v67 = __clc_fma (- v45 , v45 , v01 );
53
54
v23 = __clc_fma (v67 , v23 , v45 );
54
55
55
- v23 = __builtin_ldexp (v23 , exp1 );
56
+ v23 = __clc_ldexp (v23 , exp1 );
56
57
return (x == __builtin_inf () || (x == 0.0 )) ? v01 : v23 ;
57
58
}
58
59
You can’t perform that action at this time.
0 commit comments