All the events which we have discussed till now are all command queue created events. Applications may want to create user defined events, and use it to track the progress of different workloads given to different devices in an OpenCL context. The function for performing the same is as follows:
cl_event clCreateUserEvent (cl_context context,cl_int *errcode_ret)
The preceding function creates an user event object. Note that the user event created is per context. This means that each device in a context can wait on a user event to complete before the device command queue can execute next task. User-created events are useful for an application developer, in such a way that the developer can wait on this event in-order to reach a point of computation in his algorithm. An OpenCL algorithm may consist of many kernel tasks and data transfer operations. All user-created events reach a state of CL_SUBMIITTED
first. They do not reach a state of CL_QUEUED
since no task is queued to...