Add function cl_command_queue_flush to flush a command
authorYang Rong <rong.r.yang@intel.com>
Mon, 12 Aug 2013 08:07:19 +0000 (16:07 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Mon, 12 Aug 2013 08:36:03 +0000 (16:36 +0800)
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
src/cl_command_queue.c
src/cl_command_queue.h

index b296dd7..e82f75c 100644 (file)
@@ -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);
index 4f6f987..135d659 100644 (file)
@@ -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);