summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2015-01-30 18:00:34 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2015-01-30 18:00:34 +0000
commit51702e6e7539afabe8cf34b11bd6b6974e203054 (patch)
treed2ad3e5cfc6c49122e5d26dfba945f6c1a5a0106 /libclc/generic/include/clc
parent206d1160ce52769b579c4392b4208e39962dc951 (diff)
downloadbcm5719-llvm-51702e6e7539afabe8cf34b11bd6b6974e203054.tar.gz
bcm5719-llvm-51702e6e7539afabe8cf34b11bd6b6974e203054.zip
Implement log10
v2: Use constant and multiplication instead of division v3: Use hex constants Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 227585
Diffstat (limited to 'libclc/generic/include/clc')
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/include/clc/math/log10.h9
2 files changed, 10 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h
index bd92fdb12b5..29c185500c2 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -50,6 +50,7 @@
#include <clc/math/fmod.h>
#include <clc/math/hypot.h>
#include <clc/math/log.h>
+#include <clc/math/log10.h>
#include <clc/math/log1p.h>
#include <clc/math/log2.h>
#include <clc/math/mad.h>
diff --git a/libclc/generic/include/clc/math/log10.h b/libclc/generic/include/clc/math/log10.h
new file mode 100644
index 00000000000..ec4e4ae9362
--- /dev/null
+++ b/libclc/generic/include/clc/math/log10.h
@@ -0,0 +1,9 @@
+#undef log10
+
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION log10
+
+#include <clc/math/gentype.inc>
+
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
OpenPOWER on IntegriCloud