diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-10 22:16:31 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-10 22:16:31 +0000 |
| commit | edbde58de06efa3d5a8258dec7acbb26d9a99d86 (patch) | |
| tree | 6a5244358bb7d5f3b464ba64b86eea0904f93d64 /libclc | |
| parent | 504f85c551543f1c13d6631f044902d3ccb3c194 (diff) | |
| download | bcm5719-llvm-edbde58de06efa3d5a8258dec7acbb26d9a99d86.tar.gz bcm5719-llvm-edbde58de06efa3d5a8258dec7acbb26d9a99d86.zip | |
native_exp2: Switch implementation to llvm intrinsic
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317937
Diffstat (limited to 'libclc')
| -rw-r--r-- | libclc/generic/include/clc/math/native_exp2.h | 10 | ||||
| -rw-r--r-- | libclc/generic/lib/SOURCES | 1 | ||||
| -rw-r--r-- | libclc/generic/lib/math/native_exp2.cl | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/libclc/generic/include/clc/math/native_exp2.h b/libclc/generic/include/clc/math/native_exp2.h index b6759390ee4..a4495767589 100644 --- a/libclc/generic/include/clc/math/native_exp2.h +++ b/libclc/generic/include/clc/math/native_exp2.h @@ -1 +1,9 @@ -#define native_exp2 exp2 +#define __CLC_BODY <clc/math/unary_decl.inc> +#define __CLC_FUNCTION native_exp2 +#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 cb4147edeea..32a426fbbc6 100644 --- a/libclc/generic/lib/SOURCES +++ b/libclc/generic/lib/SOURCES @@ -120,6 +120,7 @@ math/logb.cl math/mad.cl math/modf.cl math/native_exp.cl +math/native_exp2.cl math/native_log.cl math/native_log10.cl math/native_log2.cl diff --git a/libclc/generic/lib/math/native_exp2.cl b/libclc/generic/lib/math/native_exp2.cl new file mode 100644 index 00000000000..0312f998ebd --- /dev/null +++ b/libclc/generic/lib/math/native_exp2.cl @@ -0,0 +1,7 @@ +#include <clc/clc.h> + +#define __CLC_NATIVE_INTRINSIC exp2 + +#define __CLC_BODY <native_unary_intrinsic.inc> +#define __FLOAT_ONLY +#include <clc/math/gentype.inc> |

