|Home > Using OpenCL extensions > The cl_arm_printf extension > About the cl_arm_printf extension|
The implementation of the cl_arm_printf extension uses a callback function that delivers the output data to the host from the device. You must write this callback function.
You must register the callback function as a property of the context when the OpenCL context is created. It is called when an OpenCL kernel completes. If the callback is not registered, the
printf() output is still produced but it is not available.
Messages are stored atomically and complete in the output buffer. The buffer is implemented as a circular buffer so if the output is longer than the buffer size, the output wraps around on itself. In this case, only the last part of the output is available.
You can configure the size of the buffer. The default size is 1MB.