mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 22:30:13 +00:00
half_recip: Implement using 1/x
Passes CTS on carrizo v2: Use full precision implementation Reviewer: Jeroen Ketema <j.ketema@xs4all.nl> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 322896
This commit is contained in:
parent
a1aba44ffa
commit
398108b91e
@ -77,6 +77,7 @@
|
||||
#include <clc/math/half_log.h>
|
||||
#include <clc/math/half_log10.h>
|
||||
#include <clc/math/half_log2.h>
|
||||
#include <clc/math/half_recip.h>
|
||||
#include <clc/math/half_rsqrt.h>
|
||||
#include <clc/math/half_sqrt.h>
|
||||
#include <clc/math/hypot.h>
|
||||
|
9
libclc/generic/include/clc/math/half_recip.h
Normal file
9
libclc/generic/include/clc/math/half_recip.h
Normal file
@ -0,0 +1,9 @@
|
||||
#define __CLC_BODY <clc/math/unary_decl.inc>
|
||||
#define __CLC_FUNCTION half_recip
|
||||
#define __FLOAT_ONLY
|
||||
|
||||
#include <clc/math/gentype.inc>
|
||||
|
||||
#undef __FLOAT_ONLY
|
||||
#undef __CLC_BODY
|
||||
#undef __CLC_FUNCTION
|
@ -111,6 +111,7 @@ math/half_exp2.cl
|
||||
math/half_log.cl
|
||||
math/half_log10.cl
|
||||
math/half_log2.cl
|
||||
math/half_recip.cl
|
||||
math/half_rsqrt.cl
|
||||
math/half_sqrt.cl
|
||||
math/hypot.cl
|
||||
|
10
libclc/generic/lib/math/half_recip.cl
Normal file
10
libclc/generic/lib/math/half_recip.cl
Normal file
@ -0,0 +1,10 @@
|
||||
#include <clc/clc.h>
|
||||
|
||||
#define recip(x) (1.0f/x)
|
||||
|
||||
#define __CLC_FUNC recip
|
||||
#define __CLC_BODY <half_unary.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
||||
|
||||
#undef recip
|
Loading…
Reference in New Issue
Block a user