diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-10 22:16:33 +0000 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-10 22:16:33 +0000 |
commit | 0750b7df51cfa19600fa3cdcd34b06268c97e5e8 (patch) | |
tree | 789cd99104e1ce9e6b507c38617195c4d1f6d70e | |
parent | edbde58de06efa3d5a8258dec7acbb26d9a99d86 (diff) | |
download | bcm5719-llvm-0750b7df51cfa19600fa3cdcd34b06268c97e5e8.tar.gz bcm5719-llvm-0750b7df51cfa19600fa3cdcd34b06268c97e5e8.zip |
native_cos: Switch implementation to llvm intrinsic
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317938
-rw-r--r-- | libclc/generic/include/clc/math/native_cos.h | 10 | ||||
-rw-r--r-- | libclc/generic/lib/SOURCES | 1 | ||||
-rw-r--r-- | libclc/generic/lib/math/native_cos.cl | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/libclc/generic/include/clc/math/native_cos.h b/libclc/generic/include/clc/math/native_cos.h index c7212cc4b66..31f718de15d 100644 --- a/libclc/generic/include/clc/math/native_cos.h +++ b/libclc/generic/include/clc/math/native_cos.h @@ -1 +1,9 @@ -#define native_cos cos +#define __CLC_BODY <clc/math/unary_decl.inc> +#define __CLC_FUNCTION native_cos +#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 32a426fbbc6..97244f38163 100644 --- a/libclc/generic/lib/SOURCES +++ b/libclc/generic/lib/SOURCES @@ -119,6 +119,7 @@ math/log2.cl math/logb.cl math/mad.cl math/modf.cl +math/native_cos.cl math/native_exp.cl math/native_exp2.cl math/native_log.cl diff --git a/libclc/generic/lib/math/native_cos.cl b/libclc/generic/lib/math/native_cos.cl new file mode 100644 index 00000000000..3a934272a28 --- /dev/null +++ b/libclc/generic/lib/math/native_cos.cl @@ -0,0 +1,7 @@ +#include <clc/clc.h> + +#define __CLC_NATIVE_INTRINSIC cos + +#define __CLC_BODY <native_unary_intrinsic.inc> +#define __FLOAT_ONLY +#include <clc/math/gentype.inc> |