User-created events

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 ...

Get OpenCL Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.