[compute] 01/46: enqueue_map_buffer returns associated event through parameter

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Dec 21 18:28:35 UTC 2015


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

ghisvail-guest pushed a commit to branch master
in repository compute.

commit 5c99e3f7f382ca8b486e403f6ac0b5b295dc5de9
Author: Jakub Szuppe <j.szuppe at gmail.com>
Date:   Sat Sep 12 15:21:49 2015 +0200

    enqueue_map_buffer returns associated event through parameter
---
 include/boost/compute/command_queue.hpp | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/include/boost/compute/command_queue.hpp b/include/boost/compute/command_queue.hpp
index e5c0cb0..9636d1a 100644
--- a/include/boost/compute/command_queue.hpp
+++ b/include/boost/compute/command_queue.hpp
@@ -606,12 +606,15 @@ public:
     #endif // CL_VERSION_1_2
 
     /// Enqueues a command to map \p buffer into the host address space.
+    /// Event associated with map operation is returned through
+    /// \p map_buffer_event parameter.
     ///
     /// \see_opencl_ref{clEnqueueMapBuffer}
     void* enqueue_map_buffer(const buffer &buffer,
                              cl_map_flags flags,
                              size_t offset,
                              size_t size,
+                             event &map_buffer_event,
                              const wait_list &events = wait_list())
     {
         BOOST_ASSERT(m_queue != 0);
@@ -628,7 +631,7 @@ public:
             size,
             events.size(),
             events.get_event_ptr(),
-            0,
+            &map_buffer_event.get(),
             &ret
         );
 
@@ -639,6 +642,17 @@ public:
         return pointer;
     }
 
+    /// \overload
+    void* enqueue_map_buffer(const buffer &buffer,
+                             cl_map_flags flags,
+                             size_t offset,
+                             size_t size,
+                             const wait_list &events = wait_list())
+    {
+        event event_;
+        return enqueue_map_buffer(buffer, flags, offset, size, event_, events);
+    }
+
     /// Enqueues a command to unmap \p buffer from the host memory space.
     ///
     /// \see_opencl_ref{clEnqueueUnmapMemObject}

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



More information about the debian-science-commits mailing list