diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2018-01-18 21:11:56 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-01-18 21:11:56 +0000 |
| commit | a1aba44ffa742e02b0b0cc555d8359d456402fc2 (patch) | |
| tree | 2101a6d4bd2dc1b6770f6c13c4e9f88d4f9fd0bc /libclc/generic/include/clc | |
| parent | b3b72af4b9e9144df9caadc4a7594962de020e30 (diff) | |
| download | bcm5719-llvm-a1aba44ffa742e02b0b0cc555d8359d456402fc2.tar.gz bcm5719-llvm-a1aba44ffa742e02b0b0cc555d8359d456402fc2.zip | |
half_log2: Implement using log2
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: 322895
Diffstat (limited to 'libclc/generic/include/clc')
| -rw-r--r-- | libclc/generic/include/clc/clc.h | 1 | ||||
| -rw-r--r-- | libclc/generic/include/clc/math/half_log2.h | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index 33392e60d6b..a52ed5d3d2b 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -76,6 +76,7 @@ #include <clc/math/half_exp2.h> #include <clc/math/half_log.h> #include <clc/math/half_log10.h> +#include <clc/math/half_log2.h> #include <clc/math/half_rsqrt.h> #include <clc/math/half_sqrt.h> #include <clc/math/hypot.h> diff --git a/libclc/generic/include/clc/math/half_log2.h b/libclc/generic/include/clc/math/half_log2.h new file mode 100644 index 00000000000..6a371ab46fd --- /dev/null +++ b/libclc/generic/include/clc/math/half_log2.h @@ -0,0 +1,9 @@ +#define __CLC_BODY <clc/math/unary_decl.inc> +#define __CLC_FUNCTION half_log2 +#define __FLOAT_ONLY + +#include <clc/math/gentype.inc> + +#undef __FLOAT_ONLY +#undef __CLC_BODY +#undef __CLC_FUNCTION |

