From aa4c3899b5b9af8057787a8e6e0e12cfeaf1adea Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Thu, 18 Jan 2018 21:11:48 +0000 Subject: [PATCH] half_exp10: Implement using exp10 Passes CTS on carrizo v2: Use full precision implementation Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely llvm-svn: 322892 --- libclc/generic/include/clc/clc.h | 1 + libclc/generic/include/clc/math/half_exp10.h | 9 +++++++++ libclc/generic/lib/SOURCES | 1 + libclc/generic/lib/math/half_exp10.cl | 6 ++++++ 4 files changed, 17 insertions(+) create mode 100644 libclc/generic/include/clc/math/half_exp10.h create mode 100644 libclc/generic/lib/math/half_exp10.cl diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index b1b3f5d..a9457c0 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -72,6 +72,7 @@ #include #include #include +#include #include #include #include diff --git a/libclc/generic/include/clc/math/half_exp10.h b/libclc/generic/include/clc/math/half_exp10.h new file mode 100644 index 0000000..810e3b8 --- /dev/null +++ b/libclc/generic/include/clc/math/half_exp10.h @@ -0,0 +1,9 @@ +#define __CLC_BODY +#define __CLC_FUNCTION half_exp10 +#define __FLOAT_ONLY + +#include + +#undef __FLOAT_ONLY +#undef __CLC_BODY +#undef __CLC_FUNCTION diff --git a/libclc/generic/lib/SOURCES b/libclc/generic/lib/SOURCES index f1406aa..292e9b4 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_exp10.cl math/half_exp2.cl math/half_rsqrt.cl math/half_sqrt.cl diff --git a/libclc/generic/lib/math/half_exp10.cl b/libclc/generic/lib/math/half_exp10.cl new file mode 100644 index 0000000..c63f0e4 --- /dev/null +++ b/libclc/generic/lib/math/half_exp10.cl @@ -0,0 +1,6 @@ +#include + +#define __CLC_FUNC exp10 +#define __CLC_BODY +#define __FLOAT_ONLY +#include -- 2.7.4