[Beignet] [PATCH 2/5] Add function cl_command_queue_flush to flush a command queue.
Yang Rong
rong.r.yang at intel.com
Mon Aug 5 22:37:26 PDT 2013
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
src/cl_command_queue.c | 7 +++++++
src/cl_command_queue.h | 3 +++
2 files changed, 10 insertions(+)
diff --git a/src/cl_command_queue.c b/src/cl_command_queue.c
index b296dd7..e82f75c 100644
--- a/src/cl_command_queue.c
+++ b/src/cl_command_queue.c
@@ -413,6 +413,13 @@ error:
}
LOCAL cl_int
+cl_command_queue_flush(cl_command_queue queue)
+{
+ cl_gpgpu_flush(queue->gpgpu);
+ return CL_SUCCESS;
+}
+
+LOCAL cl_int
cl_command_queue_finish(cl_command_queue queue)
{
cl_gpgpu_sync(queue->gpgpu);
diff --git a/src/cl_command_queue.h b/src/cl_command_queue.h
index 4f6f987..135d659 100644
--- a/src/cl_command_queue.h
+++ b/src/cl_command_queue.h
@@ -65,6 +65,9 @@ extern cl_int cl_command_queue_set_report_buffer(cl_command_queue, cl_mem);
/* Fulsim will dump this buffer (mostly to check its consistency */
cl_int cl_command_queue_set_fulsim_buffer(cl_command_queue, cl_mem);
+/* Flush for the command queue */
+extern cl_int cl_command_queue_flush(cl_command_queue);
+
/* Wait for the completion of the command queue */
extern cl_int cl_command_queue_finish(cl_command_queue);
--
1.7.10.4
More information about the Beignet
mailing list