forked from OSchip/llvm-project
native_rsqrt: Switch implementation to 1 / native_sqrt
Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318065
This commit is contained in:
parent
541a3f0758
commit
a6758c94ef
|
@ -1 +1,9 @@
|
|||
#define native_rsqrt rsqrt
|
||||
#define __CLC_BODY <clc/math/unary_decl.inc>
|
||||
#define __CLC_FUNCTION native_rsqrt
|
||||
#define __FLOAT_ONLY
|
||||
|
||||
#include <clc/math/gentype.inc>
|
||||
|
||||
#undef __FLOAT_ONLY
|
||||
#undef __CLC_BODY
|
||||
#undef __CLC_FUNCTION
|
||||
|
|
|
@ -126,6 +126,7 @@ math/native_exp2.cl
|
|||
math/native_log.cl
|
||||
math/native_log10.cl
|
||||
math/native_log2.cl
|
||||
math/native_rsqrt.cl
|
||||
math/native_sin.cl
|
||||
math/native_sqrt.cl
|
||||
math/native_tan.cl
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_BODY <native_rsqrt.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
|
@ -0,0 +1,3 @@
|
|||
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE native_rsqrt(__CLC_GENTYPE val) {
|
||||
return 1.0f / native_sqrt(val);
|
||||
}
|
Loading…
Reference in New Issue