cf4ocl: a C framework for OpenCL

Nuno Fachada, Vitor V. Lopes, Rui C. Martins, Agostinho C. Rosa
9/5/2016
cs.DC

Official code: nunofachada/cf4ocl (108 stars, LGPL-3.0, last commit 2024-01-06).

Abstract

OpenCL is an open standard for parallel programming of heterogeneous compute devices, such as GPUs, CPUs, DSPs or FPGAs. However, the verbosity of its C host API can hinder application development. In this paper we present cf4ocl, a software library for rapid development of OpenCL programs in pure C. It aims to reduce the verbosity of the OpenCL API, offering straightforward memory management, integrated profiling of events (e.g., kernel execution and data transfers), simple but extensible device selection mechanism and user-friendly error management. We compare two versions of a conceptual application example, one based on cf4ocl, the other developed directly with the OpenCL host API. Results show that the former is simpler to implement and offers more features, at the cost of an effectively negligible computational overhead. Additionally, the tools provided with cf4ocl allowed for a quick analysis on how to optimize the application.

View on arXivView PDF

Code Implementations(1)

nunofachada/cf4oclOfficial100%
LGPL-3.0

C Framework for OpenCL

10819C, CMakeJul 1, 20132 years agoLGPL-3.0
cframeworkgpgpugpuhpc+5 more

Similar Papers

Cite this paper

@article{fachada2016cfocl,
  title  = {cf4ocl: a C framework for OpenCL},
  author = {Nuno Fachada and Vitor V. Lopes and Rui C. Martins and Agostinho C. Rosa},
  year   = {2016},
  eprint = {1609.01257},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1609.01257}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1609.01257.svg)](https://codeofpaper.com/paper/1609.01257)

Discussion