[arrayfire] 68/284: Fix for getDeviceMemInfo function in cpu

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:20 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 919333eb379776267d1728b0747172112a484190
Author: pradeep <pradeep at arrayfire.com>
Date:   Fri Dec 11 17:36:18 2015 -0500

    Fix for getDeviceMemInfo function in cpu
    
    This changed is needed after converting the functions asynchronous
---
 src/backend/cpu/memory.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/backend/cpu/memory.cpp b/src/backend/cpu/memory.cpp
index ac10643..73120b9 100644
--- a/src/backend/cpu/memory.cpp
+++ b/src/backend/cpu/memory.cpp
@@ -14,6 +14,8 @@
 #include <dispatch.hpp>
 #include <cstdlib>
 #include <mutex>
+#include <platform.hpp>
+#include <async_queue.hpp>
 
 namespace cpu
 {
@@ -205,6 +207,7 @@ namespace cpu
     void deviceMemoryInfo(size_t *alloc_bytes, size_t *alloc_buffers,
                           size_t *lock_bytes,  size_t *lock_buffers)
     {
+        getQueue().sync();
         if (alloc_bytes   ) *alloc_bytes   = total_bytes;
         if (alloc_buffers ) *alloc_buffers = memory_map.size();
         if (lock_bytes    ) *lock_bytes    = used_bytes;

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