Title
cf4ocl: A C framework for OpenCL
Date Issued
01 September 2017
Access level
open access
Resource Type
journal article
Publisher(s)
Elsevier B.V.
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.
Start page
9
End page
19
Volume
143
Language
English
OCDE Knowledge area
Ciencias de la computación
Scopus EID
2-s2.0-85018685843
Source
Science of Computer Programming
ISSN of the container
01676423
Sponsor(s)
This work was supported by the Fundação para a Ciência e a Tecnologia (FCT) projects UID/EEA/50009/2013 and UID/MAT/04561/2013, and partially funded with grant SFRH/BD/48310/2008, also from FCT.
Sources of information: Directorio de Producción Científica Scopus