C Specification
To enqueue a wait for a specific event or a list of events to complete before any future commands queued in a command-queue are executed, call the function
// Provided by CL_VERSION_1_0
cl_int clEnqueueWaitForEvents(
cl_command_queue command_queue,
cl_uint num_events,
const cl_event* event_list);
| clEnqueueWaitForEvents is deprecated by version 1.2. |
Parameters
-
command_queue is a valid host command-queue.
-
event_list and num_events specify events that need to complete before this particular command can be executed.
Description
The events specified in event_list act as synchronization points. The context associated with events in event_list and command_queue must be the same. The memory associated with event_list can be reused or freed after the function returns.
clEnqueueWaitForEvents returns CL_SUCCESS if the function is successfully
executed.
Otherwise, it returns one of the following errors:
-
CL_INVALID_if command_queue is not a valid host command-queue.COMMAND_ QUEUE -
CL_INVALID_if context associated with command_queue and events in event_list are not the same.CONTEXT -
CL_INVALID_if num_events is 0 or event_list isVALUE NULL. -
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the device.OF_ RESOURCES -
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the host.OF_ HOST_ MEMORY
Document Notes
For more information, see the OpenCL Specification
This page is extracted from the OpenCL Specification. Fixes and changes should be made to the Specification, not directly.