From 3b8b4eb64da8979a306a549ec09b88dfd20c0c0b Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Thu, 1 Feb 2018 03:00:35 +0000 Subject: [PATCH] half_powr: Implement using powr v2: Use full precision implementation Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely llvm-svn: 323942 --- libclc/generic/include/clc/clc.h | 1 + libclc/generic/include/clc/math/half_powr.h | 7 +++++++ libclc/generic/lib/SOURCES | 1 + libclc/generic/lib/math/half_powr.cl | 6 ++++++ 4 files changed, 15 insertions(+) create mode 100644 libclc/generic/include/clc/math/half_powr.h create mode 100644 libclc/generic/lib/math/half_powr.cl diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index edb67fd9acd9..decc899d2d22 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -78,6 +78,7 @@ #include #include #include +#include #include #include #include diff --git a/libclc/generic/include/clc/math/half_powr.h b/libclc/generic/include/clc/math/half_powr.h new file mode 100644 index 000000000000..c4e524296462 --- /dev/null +++ b/libclc/generic/include/clc/math/half_powr.h @@ -0,0 +1,7 @@ +#define __CLC_BODY +#define __CLC_FUNCTION half_powr + +#include + +#undef __CLC_BODY +#undef __CLC_FUNCTION diff --git a/libclc/generic/lib/SOURCES b/libclc/generic/lib/SOURCES index 310928667436..13fe4fa98dba 100644 --- a/libclc/generic/lib/SOURCES +++ b/libclc/generic/lib/SOURCES @@ -112,6 +112,7 @@ math/half_exp2.cl math/half_log.cl math/half_log10.cl math/half_log2.cl +math/half_powr.cl math/half_recip.cl math/half_rsqrt.cl math/half_sin.cl diff --git a/libclc/generic/lib/math/half_powr.cl b/libclc/generic/lib/math/half_powr.cl new file mode 100644 index 000000000000..53174d4bd585 --- /dev/null +++ b/libclc/generic/lib/math/half_powr.cl @@ -0,0 +1,6 @@ +#include + +#define __CLC_FUNC powr +#define __CLC_BODY +#define __FLOAT_ONLY +#include