Chapter 7. Events, profiling, and synchronization


This chapter covers
  • Configuring events and event-handling
  • Using profiling to measure processing time
  • Synchronizing work-item execution


Preceding chapters have dealt with the what and how of OpenCL operations; this chapter deals with when. We’re not going to look at new types of operations, but instead you’ll learn how to monitor operations we’ve already encountered.

The concept of an event is central to this discussion. In OpenCL, an event is a data structure that corresponds to an occurrence. One event might monitor the completion of a data transfer operation and another might monitor the execution of a kernel. You can use events in three main ways:

  • Host notification— An event can ...

Get OpenCL in Action 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.