[arrayfire] 166/284: Fix bug in OpenCL JIT when calling functions that return same value

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:29 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.

commit d5077ecfdf8d04077ed356d793f84faacab1d929
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Thu Jan 7 18:14:14 2016 -0500

    Fix bug in OpenCL JIT when calling functions that return same value
    
    * Such as calling conj on float
---
 src/backend/opencl/binary.hpp    | 2 +-
 src/backend/opencl/kernel/jit.cl | 1 +
 src/backend/opencl/unary.hpp     | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/backend/opencl/binary.hpp b/src/backend/opencl/binary.hpp
index 4f58cb4..11493a5 100644
--- a/src/backend/opencl/binary.hpp
+++ b/src/backend/opencl/binary.hpp
@@ -22,7 +22,7 @@ namespace opencl
     {
         const char *name()
         {
-            return "noop";
+            return "__invalid";
         }
     };
 
diff --git a/src/backend/opencl/kernel/jit.cl b/src/backend/opencl/kernel/jit.cl
index b34bbcd..3092449 100644
--- a/src/backend/opencl/kernel/jit.cl
+++ b/src/backend/opencl/kernel/jit.cl
@@ -8,6 +8,7 @@
  ********************************************************/
 
 #define sign(in) signbit((in))
+#define __noop(a) (a)
 #define __add(lhs, rhs) (lhs) + (rhs)
 #define __sub(lhs, rhs) (lhs) - (rhs)
 #define __mul(lhs, rhs) (lhs) * (rhs)
diff --git a/src/backend/opencl/unary.hpp b/src/backend/opencl/unary.hpp
index 5a2cc9e..1e363d7 100644
--- a/src/backend/opencl/unary.hpp
+++ b/src/backend/opencl/unary.hpp
@@ -16,7 +16,7 @@ namespace opencl
 {
 
 template<af_op_t op>
-static const char *unaryName() { return "noop"; }
+static const char *unaryName() { return "__noop"; }
 
 #define UNARY_DECL(OP, FNAME)                   \
     template<> STATIC_                          \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list