OpenCL Kernel Development - 2021.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2022-03-29
Version
2021.2 English

The following OpenCL™ kernel discussion is based on the information provided in the C/C++ Kernels topic. The same programming techniques for accelerating the performance of a kernel apply to both C/C++ and OpenCL kernels. However, the OpenCL kernel uses the __attribute syntax in place of pragmas. For details of the available attributes, refer to OpenCL Attributes.

The following code examples show some of the elements of an OpenCL kernel for the Vitis™ application acceleration development flow. This is not intended to be a primer on OpenCL or kernel development, but to merely highlight some of the key difference between OpenCL and C/C++ kernels.