[libclc] 04/79: amdgpu: Add workaround for unimplemented llvm.exp intrinsic
Andreas Boll
aboll-guest at moszumanska.debian.org
Mon Mar 19 16:50:54 UTC 2018
This is an automated email from the git hooks/post-receive script.
aboll-guest pushed a commit to branch master
in repository libclc.
commit 6ce57041431533b02af120d4fe24c25e87c6baef
Author: Jan Vesely <jan.vesely at rutgers.edu>
Date: Fri Nov 10 22:16:25 2017 +0000
amdgpu: Add workaround for unimplemented llvm.exp intrinsic
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@317935 91177308-0d34-0410-b5e6-96231b3b80d8
---
amdgpu/lib/SOURCES | 1 +
amdgpu/lib/math/native_exp.cl | 5 +++++
amdgpu/lib/math/native_exp.inc | 3 +++
3 files changed, 9 insertions(+)
diff --git a/amdgpu/lib/SOURCES b/amdgpu/lib/SOURCES
index 59d8b22..20322ec 100644
--- a/amdgpu/lib/SOURCES
+++ b/amdgpu/lib/SOURCES
@@ -1,3 +1,4 @@
+math/native_exp.cl
math/native_log.cl
math/native_log10.cl
math/nextafter.cl
diff --git a/amdgpu/lib/math/native_exp.cl b/amdgpu/lib/math/native_exp.cl
new file mode 100644
index 0000000..71c9a2e
--- /dev/null
+++ b/amdgpu/lib/math/native_exp.cl
@@ -0,0 +1,5 @@
+#include <clc/clc.h>
+
+#define __CLC_BODY <native_exp.inc>
+#define __FLOAT_ONLY
+#include <clc/math/gentype.inc>
diff --git a/amdgpu/lib/math/native_exp.inc b/amdgpu/lib/math/native_exp.inc
new file mode 100644
index 0000000..c61ec01
--- /dev/null
+++ b/amdgpu/lib/math/native_exp.inc
@@ -0,0 +1,3 @@
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE native_exp(__CLC_GENTYPE val) {
+ return native_exp2(val * M_LOG2E_F);
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git
More information about the Pkg-opencl-commits
mailing list