diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2018-01-18 21:11:45 +0000 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-01-18 21:11:45 +0000 |
commit | 3c0e19b61aa2ed271afa875b8dff04ad17b4337a (patch) | |
tree | 17c5e0d064b866e8663e935847f3ac59896a8a18 | |
parent | caa9000b1cdf3fc47dc3b8dcf80cd6c5a02a618b (diff) | |
download | bcm5719-llvm-3c0e19b61aa2ed271afa875b8dff04ad17b4337a.tar.gz bcm5719-llvm-3c0e19b61aa2ed271afa875b8dff04ad17b4337a.zip |
half_exp2: Implement using exp2
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: 322891
-rw-r--r-- | libclc/generic/include/clc/clc.h | 1 | ||||
-rw-r--r-- | libclc/generic/include/clc/math/half_exp2.h | 9 | ||||
-rw-r--r-- | libclc/generic/lib/SOURCES | 1 | ||||
-rw-r--r-- | libclc/generic/lib/math/half_exp2.cl | 6 |
4 files changed, 17 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index 25119e0fd93..b1b3f5d8782 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -72,6 +72,7 @@ #include <clc/math/frexp.h> #include <clc/math/half_cos.h> #include <clc/math/half_exp.h> +#include <clc/math/half_exp2.h> #include <clc/math/half_rsqrt.h> #include <clc/math/half_sqrt.h> #include <clc/math/hypot.h> diff --git a/libclc/generic/include/clc/math/half_exp2.h b/libclc/generic/include/clc/math/half_exp2.h new file mode 100644 index 00000000000..31fb283f5e1 --- /dev/null +++ b/libclc/generic/include/clc/math/half_exp2.h @@ -0,0 +1,9 @@ +#define __CLC_BODY <clc/math/unary_decl.inc> +#define __CLC_FUNCTION half_exp2 +#define __FLOAT_ONLY + +#include <clc/math/gentype.inc> + +#undef __FLOAT_ONLY +#undef __CLC_BODY +#undef __CLC_FUNCTION diff --git a/libclc/generic/lib/SOURCES b/libclc/generic/lib/SOURCES index 72c96449047..f1406aad770 100644 --- a/libclc/generic/lib/SOURCES +++ b/libclc/generic/lib/SOURCES @@ -106,6 +106,7 @@ math/fract.cl math/frexp.cl math/half_cos.cl math/half_exp.cl +math/half_exp2.cl math/half_rsqrt.cl math/half_sqrt.cl math/hypot.cl diff --git a/libclc/generic/lib/math/half_exp2.cl b/libclc/generic/lib/math/half_exp2.cl new file mode 100644 index 00000000000..0d663ee3f1d --- /dev/null +++ b/libclc/generic/lib/math/half_exp2.cl @@ -0,0 +1,6 @@ +#include <clc/clc.h> + +#define __CLC_FUNC exp2 +#define __CLC_BODY <half_unary.inc> +#define __FLOAT_ONLY +#include <clc/math/gentype.inc> |