amdgpu/half_rsqrt: Switch implementation to native_rsqrt

Reviewer: Tom Stellard <tstellar@redhat.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 325053
This commit is contained in:
Jan Vesely 2018-02-13 22:09:31 +00:00
parent 758fbacea5
commit aad28681c2
3 changed files with 18 additions and 0 deletions

View File

@ -1,5 +1,6 @@
math/native_exp.cl
math/native_log.cl
math/native_log10.cl
math/half_rsqrt.cl
math/nextafter.cl
math/sqrt.cl

View File

@ -0,0 +1,11 @@
#include <utils.h>
#define __CLC_HALF_FUNC(x) __CLC_CONCAT(half_, x)
#define __CLC_NATIVE_FUNC(x) __CLC_CONCAT(native_, x)
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __CLC_HALF_FUNC(__CLC_FUNC)(__CLC_GENTYPE val) {
return __CLC_NATIVE_FUNC(__CLC_FUNC)(val);
}
#undef __CLC_NATIVE_FUNC
#undef __CLC_HALF_FUNC

View File

@ -0,0 +1,6 @@
#include <clc/clc.h>
#define __CLC_FUNC rsqrt
#define __FLOAT_ONLY
#define __CLC_BODY <half_native_unary.inc>
#include <clc/math/gentype.inc>