C Framework for OpenCL

View the Project on GitHub FakenMC/cf4ocl


The C Framework for OpenCL, cf4ocl, is a cross-platform pure C99 object-oriented framework for developing and benchmarking OpenCL projects in C/C++. It aims to:

  1. Promote the rapid development of OpenCL programs in C/C++.
  2. Assist in the benchmarking of OpenCL events, such as kernel execution and data transfers.
  3. Simplify the analysis of the OpenCL environment and of kernel requirements.

Currently cf4ocl 2 is alpha software. The stable 1.3.x branch can be found here, although it is much more limited in scope than the current 2.x series.




Clone, build and install the code, take a look at the examples and the user guide and API. The API may change until the beta release. Any feedback is appreciated.

Not yet implemented


Library code is licensed under LGPLv3, while the remaining code (utilities, examples and tests) is licensed under GPLv3.

Other useful C frameworks/utilities for OpenCL

If cf4ocl does not meet your requirements, take a look at the following projects: