diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-13 18:28:48 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-13 18:28:48 +0000 |
| commit | 541a3f07589bc92fcb14b85f6e12f4d56cd504de (patch) | |
| tree | 185289e7ea1545d511a1dd2900555caede5f97e2 /libclc | |
| parent | 79b7566210fde40f70bdf4b2e8f914ca0680657c (diff) | |
| download | bcm5719-llvm-541a3f07589bc92fcb14b85f6e12f4d56cd504de.tar.gz bcm5719-llvm-541a3f07589bc92fcb14b85f6e12f4d56cd504de.zip | |
native_tan: Switch implementation to use native_sin/native_cos
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318064
Diffstat (limited to 'libclc')
| -rw-r--r-- | libclc/generic/include/clc/math/native_tan.h | 17 | ||||
| -rw-r--r-- | libclc/generic/lib/SOURCES | 1 | ||||
| -rw-r--r-- | libclc/generic/lib/math/native_tan.cl | 5 | ||||
| -rw-r--r-- | libclc/generic/lib/math/native_tan.inc | 3 |
4 files changed, 17 insertions, 9 deletions
diff --git a/libclc/generic/include/clc/math/native_tan.h b/libclc/generic/include/clc/math/native_tan.h index cb4453895c5..317b0e55c46 100644 --- a/libclc/generic/include/clc/math/native_tan.h +++ b/libclc/generic/include/clc/math/native_tan.h @@ -1,10 +1,9 @@ -//===-- generic/include/clc/math/native_tan.h -----------------------------===// +#define __CLC_BODY <clc/math/unary_decl.inc> +#define __CLC_FUNCTION native_tan +#define __FLOAT_ONLY -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under both the University of Illinois Open Source -// License and the MIT license. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#define native_tan tan +#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 2b314653a88..b5e8c926084 100644 --- a/libclc/generic/lib/SOURCES +++ b/libclc/generic/lib/SOURCES @@ -128,6 +128,7 @@ math/native_log10.cl math/native_log2.cl math/native_sin.cl math/native_sqrt.cl +math/native_tan.cl math/tables.cl math/clc_nextafter.cl math/nextafter.cl diff --git a/libclc/generic/lib/math/native_tan.cl b/libclc/generic/lib/math/native_tan.cl new file mode 100644 index 00000000000..33f6d5f179d --- /dev/null +++ b/libclc/generic/lib/math/native_tan.cl @@ -0,0 +1,5 @@ +#include <clc/clc.h> + +#define __CLC_BODY <native_tan.inc> +#define __FLOAT_ONLY +#include <clc/math/gentype.inc> diff --git a/libclc/generic/lib/math/native_tan.inc b/libclc/generic/lib/math/native_tan.inc new file mode 100644 index 00000000000..61a8517e77d --- /dev/null +++ b/libclc/generic/lib/math/native_tan.inc @@ -0,0 +1,3 @@ +_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE native_tan(__CLC_GENTYPE val) { + return native_sin(val) / native_cos(val); +} |

