From Free Software Directory
Jump to: navigation, search


C Framework for OpenCL

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

  • Promote the rapid development of OpenCL host programs in C (with support for C++) and avoid the tedious and error-prone boilerplate code usually required.
  • Assist in the benchmarking of OpenCL events, such as kernel execution and data transfers. Profiling comes for free with cf4ocl.
  • Simplify the analysis of the OpenCL environment and of kernel requirements.
  • Allow for all levels of integration with existing OpenCL code: use as much or as few of cf4ocl required for your project, with full access to the underlying OpenCL objects and functions at all times.


  • Object-oriented interface to the OpenCL API
 * New/destroy functions, no direct memory alloc/free
 * Easy (and extensible) device selection
 * Simple event dependency mechanism
 * User-friendly error management
  • OpenCL version and platform independent
  • Integrated profiling
  • Advanced device query utility
  • Offline kernel compiler and linker


Documentation can be generated with Doxygen in HTML, Latex, PDF and man pages format. Latest HTML documentation.

Extension or Plugin

This package can be used as an extension, plugin, or add-on to:


LicenseVerified byVerified onNotes
License:LGPLv3orlaterJgay17 October 2014
Library code
License:GPLv3orlaterJgay17 October 2014
Remaining code

Leaders and contributors

Nuno Fachada Author

Resources and communication

Software prerequisites

Required to buildOpenCL 1.0
Required to useGLib 2.32+
Required to buildGLib 2.32+
Required to useOpenCL 1.0

This entry (in part or in whole) was last reviewed on 5 July 2016.


Property "Submitted by" (as page type) with input value "{{{Submitted by}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.
"{{{Submitted date}}}" contains an extrinsic dash or other characters that are invalid for a date interpretation.

"Author" is not in the list (Maintainer, Contributor, Developer, Sponsor, Unknown) of allowed values for the "Role" property.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the page “GNU Free Documentation License”.

The copyright and license notices on this page only apply to the text on this page. Any software or copyright-licenses or other similar notices described in this text has its own copyright notice and license, which can usually be found in the distribution or license text itself.