Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jan 6, 2024. It is now read-only.
/cf4oclPublic archive

C Framework for OpenCL

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
NotificationsYou must be signed in to change notification settings

nunofachada/cf4ocl

Repository files navigation

cicodecovCoverity Scan Build StatusLatest releaseLGPL LicenceSupported platforms

News

6 Jan. 2024

  • This repository is now archived and will not be further developed by the original author. It's hard to make a case for using OpenCL in pure C nowadays, given the existence of excellent wrappers for other programming languages. If someone wants to pick up where I left off, let me know.

4 July 2016

  • Version 2.1.0 is available for download in thereleases page.

Summary

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

  1. Promote the rapid development of OpenCL host programs in C (with support forC++) and avoid the tedious and error-prone boilerplate code usually required.
  2. Assist in the benchmarking of OpenCL events, such as kernel execution anddata transfers. Profiling comes forfree withcf4ocl.
  3. Simplify the analysis of the OpenCL environment and of kernel requirements.
  4. Allow for all levels of integration with existing OpenCL code: use as much oras few ofcf4ocl required for your project, with full access to the underlyingOpenCL objects and functions at all times.

Features

  • 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

Feedback and collaboration

Download or clonecf4ocl,build and install it,andcodea small example, such as the one below, which shows a clean and fast way tocreate an OpenCL context with a user-selected device:

#include<cf4ocl2.h>intmain() {/* Variables. */CCLContext*ctx=NULL;/* Code. */ctx=ccl_context_new_from_menu(NULL);if (ctx==NULL)exit(-1);/* Destroy context wrapper. */ccl_context_destroy(ctx);return0;}

If you like this project and want to contribute, take a look at the existingissues. We also need help withbinary packaging for different OSes.Other improvements or suggestions are of course, welcome. We appreciate anyfeedback.

Not yet integrated

A few OpenCL API calls, most of which introduced with OpenCL 2.1, arenot yet integrated withcf4ocl. However, this functionality isstill available to client code, becausecf4ocl can be used simultaneously withraw OpenCL objects and functions.

Reference

License

Library code is licensed underLGPLv3, while the remaining code(utilities, examples and tests) is licensed underGPLv3.

Other useful C frameworks/utilities for OpenCL

Ifcf4ocl does not meet your requirements, take a look at the followingprojects:


[8]ページ先頭

©2009-2025 Movatter.jp