[Beignet] [PATCH 2/5] Add function cl_command_queue_flush to flush a command queue.
Zhigang Gong
zhigang.gong at gmail.com
Wed Aug 7 02:02:24 PDT 2013
This patch looks good for me.
On Tue, Aug 06, 2013 at 01:37:26PM +0800, Yang Rong wrote:
>
> 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
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list