Git Product home page Git Product logo

cf4ocl's Introduction

Build Status codecov Coverity Scan Build Status Latest release LGPL Licence Supported platforms

News

4 July 2016

Version 2.1.0 is available for download in the releases page.

Summary

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

  1. Promote the rapid development of OpenCL host programs in C (with support for C++) and avoid the tedious and error-prone boilerplate code usually required.
  2. Assist in the benchmarking of OpenCL events, such as kernel execution and data transfers. Profiling comes for free with cf4ocl.
  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 or as few of cf4ocl required for your project, with full access to the underlying OpenCL 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 clone cf4ocl, build and install it, and code a small example, such as the one below, which shows a clean and fast way to create an OpenCL context with a user-selected device:

#include <cf4ocl2.h>
int main() {

    /* Variables. */
    CCLContext * ctx = NULL;

    /* Code. */
    ctx = ccl_context_new_from_menu(NULL);
    if (ctx == NULL) exit(-1);

    /* Destroy context wrapper. */
    ccl_context_destroy(ctx);

    return 0;
}

If you like this project and want to contribute, take a look at the existing issues. We also need help with binary packaging for different OSes. Other improvements or suggestions are of course, welcome. We appreciate any feedback.

Not yet integrated

A few OpenCL API calls, most of which introduced with OpenCL 2.1, are not yet integrated with cf4ocl. However, this functionality is still available to client code, because cf4ocl can be used simultaneously with raw OpenCL objects and functions.

Reference

License

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 projects:

cf4ocl's People

Contributors

nunofachada avatar ljramalho avatar sebastient avatar ngaloppo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.