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:
- Promote the rapid development of OpenCL programs in C/C++.
- Assist in the benchmarking of OpenCL events, such as kernel execution
and data transfers.
- Simplify the analysis of the OpenCL environment and of kernel
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.
- 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 independent
- Integrated profiling
Clone, build and install the code, take a look at the
and the user guide and API.
The API may change until the beta release. Any feedback is appreciated.
Not yet implemented
- OpenGL and DirectX interoperability
- Support for sub-devices
- Pipes and SVM (OpenCL 2.0 only)
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