cf4ocl
« Back to VersTracker
Description:
C Framework for OpenCL
Type: Formula  |  Latest Version: 2.1.0@2  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: opencl gpu parallel-computing hpc c-library framework
Install: brew install cf4ocl
About:
cf4ocl is a C framework designed to simplify the development of applications using OpenCL, the standard for parallel programming across heterogeneous platforms. It abstracts away the verbose and error-prone boilerplate code required for managing OpenCL contexts, devices, memory, and kernels. The framework's primary value is providing a higher-level, object-oriented API that significantly reduces development time and improves code maintainability for GPU and multi-core CPU computing projects.
Key Features:
  • Object-oriented C wrapper for the low-level OpenCL API
  • Simplified management of contexts, devices, queues, and kernels
  • Automatic handling of resource deallocation to prevent memory leaks
  • Built-in support for profiling and event management
  • Error handling that maps OpenCL error codes to descriptive messages
Use Cases:
  • Developing high-performance computing (HPC) applications in C/C++
  • Prototyping scientific simulations or data-parallel algorithms
  • Creating custom image or signal processing filters using GPU acceleration
Alternatives:
  • OpenCL C++ bindings – The official C++ bindings offer a similar object-oriented approach but require a C++ compiler, whereas cf4ocl is a pure C library.
  • ViennaCL – ViennaCL is a higher-level linear algebra library, while cf4ocl is a more general-purpose wrapper for any OpenCL application.
License: LGPL-3.0-or-later AND GPL-3.0-or-later
Dependencies: glib, opencl-icd-loader, pocl
Bottles available for: arm64_sequoia, arm64_sonoma, arm64_ventura, arm64_monterey, sonoma, ventura, monterey, x86_64_linux
Version History
Detected Version Rev Change Commit
Nov 17, 2024 8:34pm 2 VERSION_BUMP 74f4f57c
Sep 14, 2024 8:03pm 2 VERSION_BUMP f92c8c82