diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2018-01-18 21:12:01 +0000 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-01-18 21:12:01 +0000 |
commit | bf38fae8de2e9f2b78aa69fbeae4c31cd0ee0aa5 (patch) | |
tree | 8b1c82f226ab5a4781f4bcabaf846d21c5a039c9 | |
parent | 398108b91e0a7fa01d8216406bc6a0c6f1e2ff43 (diff) | |
download | bcm5719-llvm-bf38fae8de2e9f2b78aa69fbeae4c31cd0ee0aa5.tar.gz bcm5719-llvm-bf38fae8de2e9f2b78aa69fbeae4c31cd0ee0aa5.zip |
half_sin: Implement using sin
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: 322897
-rw-r--r-- | libclc/generic/include/clc/clc.h | 1 | ||||
-rw-r--r-- | libclc/generic/include/clc/math/half_sin.h | 9 | ||||
-rw-r--r-- | libclc/generic/lib/SOURCES | 1 | ||||
-rw-r--r-- | libclc/generic/lib/math/half_sin.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 8be8b38d471..4431db62717 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -79,6 +79,7 @@ #include <clc/math/half_log2.h> #include <clc/math/half_recip.h> #include <clc/math/half_rsqrt.h> +#include <clc/math/half_sin.h> #include <clc/math/half_sqrt.h> #include <clc/math/hypot.h> #include <clc/math/ilogb.h> diff --git a/libclc/generic/include/clc/math/half_sin.h b/libclc/generic/include/clc/math/half_sin.h new file mode 100644 index 00000000000..8ab7d1713c6 --- /dev/null +++ b/libclc/generic/include/clc/math/half_sin.h @@ -0,0 +1,9 @@ +#define __CLC_BODY <clc/math/unary_decl.inc> +#define __CLC_FUNCTION half_sin +#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 ee28690a257..477d1e681f7 100644 --- a/libclc/generic/lib/SOURCES +++ b/libclc/generic/lib/SOURCES @@ -113,6 +113,7 @@ math/half_log10.cl math/half_log2.cl math/half_recip.cl math/half_rsqrt.cl +math/half_sin.cl math/half_sqrt.cl math/hypot.cl math/ilogb.cl diff --git a/libclc/generic/lib/math/half_sin.cl b/libclc/generic/lib/math/half_sin.cl new file mode 100644 index 00000000000..a64eec96c9d --- /dev/null +++ b/libclc/generic/lib/math/half_sin.cl @@ -0,0 +1,6 @@ +#include <clc/clc.h> + +#define __CLC_FUNC sin +#define __CLC_BODY <half_unary.inc> +#define __FLOAT_ONLY +#include <clc/math/gentype.inc> |