summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2017-10-25 16:49:22 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2017-10-25 16:49:22 +0000
commit47e093da9b48260e6f030fc21a96ef03b4a1fec5 (patch)
tree9b8410be2a7a2f25bbb121050916679947b70a69 /libclc/generic/include
parent9fedbb9d8e0c43cead1dbb5ae5877ee02a18ea3d (diff)
downloadbcm5719-llvm-47e093da9b48260e6f030fc21a96ef03b4a1fec5.tar.gz
bcm5719-llvm-47e093da9b48260e6f030fc21a96ef03b4a1fec5.zip
math: Implement native_log10
Use llvm instrinsic by default Provide amdgpu workaround v2: drop old amd copyrights Reviewer: Aaron Watry Reviewed-by: Vedran Miletić <vedran@miletic.net> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 316588
Diffstat (limited to 'libclc/generic/include')
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/include/clc/math/native_log10.h5
-rw-r--r--libclc/generic/include/clc/math/native_log10.inc1
3 files changed, 7 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h
index 3701336ad1a..5d64751e365 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -104,6 +104,7 @@
#include <clc/math/native_exp10.h>
#include <clc/math/native_exp2.h>
#include <clc/math/native_log.h>
+#include <clc/math/native_log10.h>
#include <clc/math/native_log2.h>
#include <clc/math/native_powr.h>
#include <clc/math/native_recip.h>
diff --git a/libclc/generic/include/clc/math/native_log10.h b/libclc/generic/include/clc/math/native_log10.h
new file mode 100644
index 00000000000..b877efdfac4
--- /dev/null
+++ b/libclc/generic/include/clc/math/native_log10.h
@@ -0,0 +1,5 @@
+#define __CLC_BODY <clc/math/native_log10.inc>
+#define __FLOAT_ONLY
+#include <clc/math/gentype.inc>
+#undef __CLC_BODY
+#undef __FLOAT_ONLY
diff --git a/libclc/generic/include/clc/math/native_log10.inc b/libclc/generic/include/clc/math/native_log10.inc
new file mode 100644
index 00000000000..ce5a9949714
--- /dev/null
+++ b/libclc/generic/include/clc/math/native_log10.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE native_log10(__CLC_GENTYPE a);
OpenPOWER on IntegriCloud