Event-based or fine-grained synchronization

OpenCL has an event-based synchronization mechanism. These event handles identify the unique commands in the queue and can be used for synchronizing algorithm execution. It can also be used for profiling the queued task. We will discuss more about profiling in a later section. OpenCL event is an object which holds the state of the task. An OpenCL event state is defined as one of the following stages based on the life time of the task:

  • CL_QUEUED: The command is enqueued into the command_queue queue, but it has not yet been submitted to the device. This state is the first state for all events except for the user events.
  • CL_SUBMITTED: This state means that the host has submitted this command to the host. ...

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.