CLWAIT(3) Standard Compute Layer (CL) Manual CLWAIT(3)
NAME
clwait - Block on one or more CL events
SYNOPSIS
#include <stdcl.h>
cl_event clwait( CONTEXT* cp, cl_uint devnum, int flags);
Link with -lstdcl.
DESCRIPTION
clwait() is used to block on the completion of one or more outstanding
events for device number devnum within a CL context. The type of
events are specificed by selecting one or more event lists as described
below.
One or more event lists may be selected using a combination of the fol-
lowing flags:
CL_KERNEL_EVENT
Block on events in the ordered kernel event list.
CL_MEM_EVENT
Block on events in the ordered memory event list.
Note that if both kernel and memory event lists are specified, the ker-
nel event list has first priority. Specifically, clwait() will first
block on all outstanding kernel events and subsequently block on all
outstanding memory events.
The bahavior of clwait() can be controlled using the following flags:
CL_EVENT_RELEASE
Force clwait() to release all events on upon completion for all
events on which it blocks. If this flag is not used the pro-
grammer is responsible for releasing the returned event using
clReleaseEvent().
RETURN VALUE
On error clwait() will return (cl_event)(-1) and errno is set appropri-
ately.
AUTHOR
Written by David Richie.
REPORTING BUGS
Report bugs to <support@browndeertechnology.com>
COPYRIGHT
Copyright (C) 2009 Brown Deer Technology, LLC. Licensed under the GNU
Lesser General Public License version 3 (LGPLv3). There is NO WARRANTY
to the extent permitted by law.
SEE ALSO
clfork(3), clmsync(3), clwaitev(3) stdcl(3)
libstdcl-0.7 2009-11-10 CLWAIT(3)