An event is a cl_event
object that forms a medium of communication between the application and the OpenCL implementation. These event objects help in monitoring the OpenCL operations and commands. This monitoring can be of data transfer between the host and the devices and vice versa or either for the execution of the NDRange kernel. In OpenCL, an event is an object that specifies the state of a command queued into the OpenCL command queue. In OpenCL, events can be queried to notify the host that a command has completed its execution on the device. Besides this it can also be used for command synchronization. During command synchronization, a command which is queued for execution will wait on a list of events to complete before executing itself. In all the previous chapters you might have seen the last few parameters common across all the APIs starting with signature clEnqueue*
.
clEnqueue*( ***, cl_uint num_events_in_wait_list,const cl_event *event_wait_list...