[arrayfire] 22/284: converted sort_index cpu function to asynchronous call

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:15 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 330ae1c3b7fc85c8794069a9a4fa09b43615493e
Author: pradeep <pradeep at arrayfire.com>
Date:   Thu Nov 19 17:06:40 2015 -0500

    converted sort_index cpu function to asynchronous call
    
    This also fixed assign unit test: `ArrayAssign.CPP_ASSIGN_VECTOR_2D`
---
 src/backend/cpu/sort_index.cpp | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/backend/cpu/sort_index.cpp b/src/backend/cpu/sort_index.cpp
index eb6b4be..f07d585 100644
--- a/src/backend/cpu/sort_index.cpp
+++ b/src/backend/cpu/sort_index.cpp
@@ -14,16 +14,12 @@
 #include <err_cpu.hpp>
 #include <algorithm>
 #include <numeric>
-#include <queue>
-#include <future>
+#include <platform.hpp>
+#include <async_queue.hpp>
 
 using std::greater;
 using std::less;
 using std::sort;
-using std::function;
-using std::queue;
-using std::future;
-using std::async;
 
 namespace cpu
 {
@@ -85,8 +81,7 @@ namespace cpu
         val = createEmptyArray<T>(in.dims());
         idx = createEmptyArray<uint>(in.dims());
         switch(dim) {
-            case 0: sort0_index<T, isAscending>(val, idx, in);
-                    break;
+            case 0: getQueue().enqueue(sort0_index<T, isAscending>, val, idx, in); break;
             default: AF_ERROR("Not Supported", AF_ERR_NOT_SUPPORTED);
         }
     }

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