diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2018-02-01 03:00:35 +0000 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-02-01 03:00:35 +0000 |
commit | 3b8b4eb64da8979a306a549ec09b88dfd20c0c0b (patch) | |
tree | 5ac1df459493f729c511cefa81c23ab9cc2ed9e6 /libclc/generic | |
parent | dece62a7728b2ef1edf5ea039e7043996fe25f9f (diff) | |
download | bcm5719-llvm-3b8b4eb64da8979a306a549ec09b88dfd20c0c0b.tar.gz bcm5719-llvm-3b8b4eb64da8979a306a549ec09b88dfd20c0c0b.zip |
half_powr: Implement using powr
v2: Use full precision implementation
Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 323942
Diffstat (limited to 'libclc/generic')
-rw-r--r-- | libclc/generic/include/clc/clc.h | 1 | ||||
-rw-r--r-- | libclc/generic/include/clc/math/half_powr.h | 7 | ||||
-rw-r--r-- | libclc/generic/lib/SOURCES | 1 | ||||
-rw-r--r-- | libclc/generic/lib/math/half_powr.cl | 6 |
4 files changed, 15 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index edb67fd9acd..decc899d2d2 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -78,6 +78,7 @@ #include <clc/math/half_log.h> #include <clc/math/half_log10.h> #include <clc/math/half_log2.h> +#include <clc/math/half_powr.h> #include <clc/math/half_recip.h> #include <clc/math/half_rsqrt.h> #include <clc/math/half_sin.h> 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 00000000000..c4e52429646 --- /dev/null +++ b/libclc/generic/include/clc/math/half_powr.h @@ -0,0 +1,7 @@ +#define __CLC_BODY <clc/math/binary_decl_tt.inc> +#define __CLC_FUNCTION half_powr + +#include <clc/math/gentype.inc> + +#undef __CLC_BODY +#undef __CLC_FUNCTION diff --git a/libclc/generic/lib/SOURCES b/libclc/generic/lib/SOURCES index 31092866743..13fe4fa98db 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 00000000000..53174d4bd58 --- /dev/null +++ b/libclc/generic/lib/math/half_powr.cl @@ -0,0 +1,6 @@ +#include <clc/clc.h> + +#define __CLC_FUNC powr +#define __CLC_BODY <half_binary.inc> +#define __FLOAT_ONLY +#include <clc/math/gentype.inc> |