C Specification
To return information about an event object, call the function
// Provided by CL_VERSION_1_0
cl_int clGetEventInfo(
cl_event event,
cl_event_info param_name,
size_t param_value_size,
void* param_value,
size_t* param_value_size_ret);
Parameters
-
event specifies the event object being queried.
-
param_name specifies the information to query. The list of supported param_name types and the information returned in param_value by clGetEventInfo is described in the Event Object Queries table.
-
param_value is a pointer to memory where the appropriate result being queried is returned. If param_value is
NULL, it is ignored. -
param_value_size specifies the size in bytes of memory pointed to by param_value. This size must be greater than or equal to the size of the return type specified in the Event Object Queries table. If param_value is
NULL, it is ignored. -
param_value_size_ret returns the actual size in bytes of data being queried by param_name. If param_value_size_ret is
NULL, it is ignored.
Description
| Event Info | Return Type | Description |
|---|---|---|
|
|
Return the command-queue associated with event.
For user event objects, a If the |
missing before version 1.1. |
|
Return the context associated with event. |
|
|
Return the command type associated with event as described in the Event Command Types table. |
|
|
Return the execution status of the command identified by event. Valid values are: Or an error code given by a negative integer value (command was abnormally terminated - this may be caused by a bad memory access etc.). These error codes come from the same set of error codes that are returned from the platform or runtime API calls as return values or errcode_ret values. If the |
|
|
Return the event reference count. |
| Events Created By | Event Command Type |
|---|---|
clEnqueueNDRangeKernel |
|
clEnqueueTask |
|
clEnqueueNativeKernel |
|
clEnqueueReadBuffer |
|
clEnqueueWriteBuffer |
|
clEnqueueCopyBuffer |
|
clEnqueueReadImage |
|
clEnqueueWriteImage |
|
clEnqueueCopyImage |
|
clEnqueueCopyBufferToImage |
|
clEnqueueCopyImageToBuffer |
|
clEnqueueMapBuffer |
|
clEnqueueMapImage |
|
clEnqueueUnmapMemObject |
|
clEnqueueMarker, |
|
clEnqueueReadBufferRect |
missing before version 1.1. |
clEnqueueWriteBufferRect |
missing before version 1.1. |
clEnqueueCopyBufferRect |
missing before version 1.1. |
clCreateUserEvent |
missing before version 1.1. |
clEnqueueBarrier, |
missing before version 1.2. |
clEnqueueMigrateMemObjects |
missing before version 1.2. |
clEnqueueFillBuffer |
missing before version 1.2. |
clEnqueueFillImage |
missing before version 1.2. |
clEnqueueSVMFree |
missing before version 2.0. |
clEnqueueSVMMemcpy |
missing before version 2.0. |
clEnqueueSVMMemFill |
missing before version 2.0. |
clEnqueueSVMMap |
missing before version 2.0. |
clEnqueueSVMUnmap |
missing before version 2.0. |
clEnqueueSVMMigrateMem |
missing before version 3.0. Prior to OpenCL 3.0, implementations should return
|
clEnqueueCommandBufferKHR |
provided by the |
clEnqueueAcquireDX9MediaSurfacesKHR |
provided by the |
clEnqueueReleaseDX9MediaSurfacesKHR |
provided by the |
clEnqueueAcquireD3D10ObjectsKHR |
provided by the |
clEnqueueReleaseD3D10ObjectsKHR |
provided by the |
clEnqueueAcquireD3D11ObjectsKHR |
provided by the |
clEnqueueReleaseD3D11ObjectsKHR |
provided by the |
clEnqueueAcquireEGLObjectsKHR |
provided by the |
clEnqueueReleaseEGLObjectsKHR |
provided by the |
clCreateEventFromEGLSyncKHR |
provided by the |
clEnqueueAcquireExternalMemObjectsKHR |
provided by the |
clEnqueueReleaseExternalMemObjectsKHR |
provided by the |
clEnqueueAcquireGLObjects |
|
clEnqueueReleaseGLObjects |
|
clCreateEventFromGLsyncKHR |
provided by the |
clEnqueueSignalSemaphoresKHR |
provided by the |
clEnqueueWaitSemaphoresKHR |
provided by the |
Using clGetEventInfo to determine if a command identified by event has
finished execution (i.e. CL_EVENT_ returns
CL_COMPLETE) is not a synchronization point.
There are no guarantees that the memory objects being modified by command
associated with event will be visible to other enqueued commands.
clGetEventInfo returns CL_SUCCESS if the function is executed
successfully.
Otherwise, it returns one of the following errors:
-
CL_INVALID_if event is a not a valid event object.EVENT -
CL_INVALID_if param_name is not one of the supported values, or if the size in bytes specified by param_value_size is less than size of the return type specified in the Event Object Queries table and param_value is notVALUE NULL. -
CL_INVALID_if the information to query given in param_name cannot be queried for event.VALUE -
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.