8.2.1 Do not use clFinish() for synchronization

Sometimes the application processor must access data written by OpenCL. You can do this with clFinish(), but this serializes execution.

Sometimes the application processor must access data written by OpenCL.
You can do this with clFinish(), but this introduces delays because calls to clFinish() wait until the OpenCL job completes. During that time, the control thread is idle.
Avoid this if possible because it serializes execution.
Instead, where possible, use clWaitForEvents() or callbacks to ensure that the control thread and OpenCL can work in parallel.
Non-ConfidentialPDF file icon PDF versionARM 100614_0300_00_en
Copyright © 2012, 2013, 2015, 2016 ARM. All rights reserved.