[arrayfire] 05/75: Compile fix for armel architecture

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:01:07 UTC 2016


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

ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.

commit d0f401e6a21028e70230753c08c47217d1880d37
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Tue Feb 9 15:16:59 2016 -0500

    Compile fix for armel architecture
---
 src/backend/cpu/kernel/sort.hpp        |  1 +
 src/backend/cpu/kernel/sort_by_key.hpp |  1 +
 src/backend/cpu/kernel/sort_index.hpp  |  1 +
 src/backend/cpu/queue.hpp              | 37 ++++++++++++++++++++++++++++++++--
 src/backend/cpu/tile.cpp               |  1 -
 src/backend/cpu/transform.cpp          |  1 -
 src/backend/cpu/transpose.cpp          |  1 -
 src/backend/cpu/triangle.cpp           |  1 -
 src/backend/cpu/unwrap.cpp             |  1 -
 src/backend/cpu/where.cpp              |  1 -
 src/backend/cpu/wrap.cpp               |  1 -
 11 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/src/backend/cpu/kernel/sort.hpp b/src/backend/cpu/kernel/sort.hpp
index cba07fa..292c638 100644
--- a/src/backend/cpu/kernel/sort.hpp
+++ b/src/backend/cpu/kernel/sort.hpp
@@ -14,6 +14,7 @@
 #include <algorithm>
 #include <numeric>
 #include <err_cpu.hpp>
+#include <functional>
 
 namespace cpu
 {
diff --git a/src/backend/cpu/kernel/sort_by_key.hpp b/src/backend/cpu/kernel/sort_by_key.hpp
index 77713a7..f9d391d 100644
--- a/src/backend/cpu/kernel/sort_by_key.hpp
+++ b/src/backend/cpu/kernel/sort_by_key.hpp
@@ -15,6 +15,7 @@
 #include <numeric>
 #include <queue>
 #include <err_cpu.hpp>
+#include <functional>
 
 namespace cpu
 {
diff --git a/src/backend/cpu/kernel/sort_index.hpp b/src/backend/cpu/kernel/sort_index.hpp
index d2de05a..b71cc47 100644
--- a/src/backend/cpu/kernel/sort_index.hpp
+++ b/src/backend/cpu/kernel/sort_index.hpp
@@ -14,6 +14,7 @@
 #include <algorithm>
 #include <numeric>
 #include <err_cpu.hpp>
+#include <functional>
 
 namespace cpu
 {
diff --git a/src/backend/cpu/queue.hpp b/src/backend/cpu/queue.hpp
index 942ae25..c321644 100644
--- a/src/backend/cpu/queue.hpp
+++ b/src/backend/cpu/queue.hpp
@@ -8,7 +8,40 @@
  ********************************************************/
 
 #include <util.hpp>
+
+//FIXME: Is there a better way to check for std::future not being supported ?
+#if defined(__GNUC__) && (__GCC_ATOMIC_INT_LOCK_FREE < 2 || __GCC_ATOMIC_POINTER_LOCK_FREE < 2)
+
+#include <functional>
+using std::function;
+#include <err_cpu.hpp>
+#define __SYNCHRONOUS_ARCH 1
+class queue_impl
+{
+public:
+    template <typename F, typename... Args>
+    void enqueue(const F func, Args... args) const {
+        AF_ERROR("Incorrectly configured", AF_ERR_INTERNAL);
+    }
+
+    void sync() const {
+        AF_ERROR("Incorrectly configured", AF_ERR_INTERNAL);
+    }
+
+    bool is_worker() const {
+        AF_ERROR("Incorrectly configured", AF_ERR_INTERNAL);
+        return false;
+    }
+
+};
+
+#else
+
 #include <async_queue.hpp>
+#define __SYNCHRONOUS_ARCH 0
+typedef async_queue queue_impl;
+
+#endif
 
 #pragma once
 
@@ -18,7 +51,7 @@ namespace cpu {
 class queue {
 public:
   queue()
-    : sync_calls( getEnvVar("AF_SYNCHRONOUS_CALLS") == "1") {}
+    : sync_calls( __SYNCHRONOUS_ARCH == 1 || getEnvVar("AF_SYNCHRONOUS_CALLS") == "1") {}
 
   template <typename F, typename... Args>
   void enqueue(const F func, Args... args) {
@@ -40,7 +73,7 @@ public:
 
 private:
   const bool sync_calls;
-  async_queue aQueue;
+  queue_impl aQueue;
 };
 
 }
diff --git a/src/backend/cpu/tile.cpp b/src/backend/cpu/tile.cpp
index 6526917..0fe52c6 100644
--- a/src/backend/cpu/tile.cpp
+++ b/src/backend/cpu/tile.cpp
@@ -10,7 +10,6 @@
 #include <Array.hpp>
 #include <tile.hpp>
 #include <platform.hpp>
-#include <async_queue.hpp>
 #include <kernel/tile.hpp>
 
 namespace cpu
diff --git a/src/backend/cpu/transform.cpp b/src/backend/cpu/transform.cpp
index b2ab8db..3a76fb2 100644
--- a/src/backend/cpu/transform.cpp
+++ b/src/backend/cpu/transform.cpp
@@ -11,7 +11,6 @@
 #include <transform.hpp>
 #include <math.hpp>
 #include <platform.hpp>
-#include <async_queue.hpp>
 #include "transform_interp.hpp"
 #include <kernel/transform.hpp>
 
diff --git a/src/backend/cpu/transpose.cpp b/src/backend/cpu/transpose.cpp
index 32663e1..a6d4107 100644
--- a/src/backend/cpu/transpose.cpp
+++ b/src/backend/cpu/transpose.cpp
@@ -13,7 +13,6 @@
 #include <Array.hpp>
 #include <transpose.hpp>
 #include <platform.hpp>
-#include <async_queue.hpp>
 #include <kernel/transpose.hpp>
 #include <utility>
 #include <cassert>
diff --git a/src/backend/cpu/triangle.cpp b/src/backend/cpu/triangle.cpp
index 2a9553c..57f61b1 100644
--- a/src/backend/cpu/triangle.cpp
+++ b/src/backend/cpu/triangle.cpp
@@ -13,7 +13,6 @@
 #include <triangle.hpp>
 #include <math.hpp>
 #include <platform.hpp>
-#include <async_queue.hpp>
 #include <kernel/triangle.hpp>
 
 namespace cpu
diff --git a/src/backend/cpu/unwrap.cpp b/src/backend/cpu/unwrap.cpp
index 1aa37a4..d19286f 100644
--- a/src/backend/cpu/unwrap.cpp
+++ b/src/backend/cpu/unwrap.cpp
@@ -12,7 +12,6 @@
 #include <dispatch.hpp>
 #include <math.hpp>
 #include <platform.hpp>
-#include <async_queue.hpp>
 #include <kernel/unwrap.hpp>
 
 namespace cpu
diff --git a/src/backend/cpu/where.cpp b/src/backend/cpu/where.cpp
index 018cbdf..2493271 100644
--- a/src/backend/cpu/where.cpp
+++ b/src/backend/cpu/where.cpp
@@ -17,7 +17,6 @@
 #include <ops.hpp>
 #include <vector>
 #include <platform.hpp>
-#include <async_queue.hpp>
 
 using af::dim4;
 
diff --git a/src/backend/cpu/wrap.cpp b/src/backend/cpu/wrap.cpp
index 07487e0..8e0f6fe 100644
--- a/src/backend/cpu/wrap.cpp
+++ b/src/backend/cpu/wrap.cpp
@@ -12,7 +12,6 @@
 #include <dispatch.hpp>
 #include <math.hpp>
 #include <platform.hpp>
-#include <async_queue.hpp>
 #include <kernel/wrap.hpp>
 
 namespace cpu

-- 
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