OpenCL is a C-based language. There are OpenCL platforms that run on GPUs (from NVidia and AMD ) and processors (from Intel and AMD ).
Although you can run the same OpenCL code on both GPUs and processors, it really needs to be optimized for the target device. For maximum performance, you will need to write different code for different GPUs and processors. However, the OpenCL CPU platform can function as a low-performance reserve for even optimized graphics code.
If you are happy to write conditional directives that are executed depending on the target device (CPU or GPU), then this can help in the performance of OpenCL code on multiple devices.
source share