clEnqueueWaitForEvents

Enqueues a wait for a specific event or a list of events to complete before any future commands queued in the command-queue are executed.

cl_int clEnqueueWaitForEvents ( cl_command_queue command_queue,
  cl_uint num_events,
  const cl_event *event_list)

Parameters

command_queue

A valid command-queue.

num_events

Specifies the number of events given by event_list.

event_list

Events specified in event_list act as synchronization points. The context associated with events in event_list and command_queue must be the same. Each event in event_list must be a valid event object returned by a previous call to the following:

Notes

The context associated with events in event_list and command_queue must be the same.

Errors

Returns CL_SUCCESS if the function was successfully executed, or one of the errors below:

  • CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • CL_INVALID_CONTEXT if the context associated with command_queue and events in event_list are not the same.
  • CL_INVALID_VALUE if num_events is zero or event_list is NULL.
  • CL_INVALID_EVENT if event objects specified in event_list are not valid events.
  • CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.

Specification

OpenCL Specification

Also see

clEnqueueNDRangeKernel, clEnqueueTask, clEnqueueNativeKernel, clEnqueueReadBuffer, clEnqueueWriteBuffer, clEnqueueMapBuffer, clEnqueueReadImage, clEnqueueWriteImage, clEnqueueMapImage, clEnqueueCopyBuffer, clEnqueueCopyImage, clEnqueueCopyBufferToImage, clEnqueueCopyImageToBuffer, clEnqueueMarker

Copyright © 2007-2010 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.