Resources
Commercial and Open Source Implementations
- OpenCL FFT
-
The Disccrete Fourier Transform (DFT) is a Fourier Analysis function that computes the frequency domain representation of a given input. The DFT has an enormous amount of applications, including spectral analysis, data compression, multiplication of polynomials and computation of remaining fatigue life of materials.
CMSoft presents an easy-to-use powerful tool to compute the DFT using the Fast Fourier Transform algorithm using OpenCL, both single-precision and double-precision. Source code containing examples is available.
- Java Bindings to OpenCL
-
JOCL enables applications running on the JVM to use OpenCL for massively parallel, high performance computing tasks, executed on heterogeneous hardware (GPUs, CPUs, FPGAs etc) in a platform independent manner.
- OpenCL Support Vector Machine
-
Support Vector Machine (SVM) is a statistical learning tool considered to be the state-of-the art classifier for many applications today, including medical research and text categorization.
CMSoft brings an OpenCL accelerated SVM implementation that can be used for general-purpose classification. Source code is provided showing classification of the MNIST handwritten database.
- OpenCL Marching Cubes
-
Marching Cubes is an algorithm used in a very wide range of applications, including:
- Medical visualizations such as CT and MRI scan images;
- Special 3D effects and 3D modelling of metaballs or metasurfaces:
- Analysis of oil reservoirs in the oil and gas industry;
- Reconstitution of surfaces whose data has been acquired through seismic methods.
CMSoft brings a versatile and useful tool, Marching Cubes, adapted to GPU acceleration using OpenCL. Sample source code is available. OpenCLTemplate Marching Cubes is another resource made available to users who want to have easy access to GPU accelerated mathematical tools.
- ODE system solving with OpenCL
-
Differential equations are crucial to all exact sciences, such as engineering, physics, chemistry and even economics. There packages use GPUs to compute solutions to problems such as solving linear systems and computing FFT. This work covers an easy-to-use ordinary differential equation system solver for scientific applications and games. Examples include calculating trajectories and collision of particles in game engines, electron-proton interactions, gravitational calculations, dynamic modeling of deformable bodies and many more.
- CLyther - an OOP extension to OpenCL language definition
-
CLyther, is a Python tool similar to Cython. CLyther is a python language extension that makes writing OpenCL code as easy as Python itself. CLyther currently only supports a subset of the Python language definition but adds many new features to OpenCL. CLyther exposes both the OpenCL C library as well as the OpenCL language to python.
CLyther Features:
- Fast prototyping of OpenCL code.
- Create OpenCL code using the Python language definition.
- Strong OOP programming in OpenCL code.
- Passing functions as arguments to kernel functions.
- Python emulation mode of OpenCL code.
- Fancy indexing of arrays
- Device memory management
- Dynamic compilation at runtime
Permalink | View CLyther - an OOP extension to OpenCL language definition
- Ruby-OpenCL
-
Ruby-OpenCL is a ruby binding of OpenCL providing classes for OpenCL programing on the host. Currently works with ATI Stream SDK 2.0 beta.
- OpenCL for PLT Scheme
-
A complete binding of OpenCL for PLT Scheme.
- PyOpenCL
-
PyOpenCL is a complete, object-oriented language binding of OpenCL to Python. It has full documentation available and is licensed under the liberal MIT license.
- The Open Toolkit library
-
Cross-platform OpenGL, OpenGL ES, OpenAL and OpenCL bindings for .Net/Mono. Compatible with Windows, Linux and Mac OS X and usable by all .Net languages (C#, VB.Net, C++/CLI, ...)
Frameworks
- SnuCL OpenCL framework ( freely available )
-
SnuCL is an OpenCL framework and freely available, open-source software developed at Seoul National University. It naturally extends the original OpenCL semantics to the heterogeneous cluster environment. The target cluster consists of a single host node and multiple compute nodes. They are connected by an interconnection network, such as Gigabit and InfiniBand switches. The host node contains multiple CPU cores and each compute node consists of multiple CPU cores and multiple GPUs. For such clusters, SnuCL provides an illusion of a single heterogeneous system for the programmer. A GPU or a set of CPU cores becomes an OpenCL compute device. SnuCL allows the application to utilize compute devices in a compute node as if they were in the host node.
Permalink | View SnuCL OpenCL framework ( freely available )
- libCL
-
libCL is an open-source parallel algorithm library written in C++ and OpenCL, released under the Apache 2.0 license. Based on a thin layer of wrapper classes for OpenCL and OpenGL are implementations of parallel algorithms ranging from simple primitives such as sorting, searching and algebra to complex systems of algorithms for computational research and visualization. libCL emerged out of OpenCL Studio, and as such integrates well with the development environment and its rich prototyping and visualization capabilities.
- OpenCL/GL Framework
-
Interoperation between OpenCL and OpenGL allows programmers to efficiently perform complex manipulation of data directly in the GPU memory. CMSoft brings to developers the new GLRender tool in OpenCLTemplate that automates the creation of an OpenGL scene coupled with a derived OpenCL context.
It is possible to create and display buffer objects in the OpenGL scene as well as manipulate them using OpenCL interoperation with very little effort using a pre-configured OpenCL environment. Two source codes are provided to demonstrate the framework capabilities: one that draws a Mandelbrot fractal set and another to show the capabilities of the 3D mouse in a CL/GL shared environment.
- ViennaCL - Linear Algebra and Iterative Solvers using OpenCL
-
The Vienna Computing Library (ViennaCL) is a scientific computing library written in C++ and based on OpenCL. It allows simple, high-level access to the vast computing ressources available on parallel architectures such as GPUs and is primarily focused on common linear algebra operations (BLAS level 1 and 2) and the solution of large systems of equations by means of iterative methods. In ViennaCL 1.0.x, the following iterative solvers are implemented:
* Conjugate Gradient (CG)
* Stabilized BiConjugate Gradient (BiCGStab)
* Generalized Minimum Residual (GMRES)An optional ILU preconditioner can be used, which is in ViennaCL 1.0.x precomputed on the CPU and may thus not lead to overall performance gains. Under the hood, ViennaCL uses OpenCL for accessing and executing code on compute devices. Therefore, ViennaCL is not tailored to products from a particular vendor and can be used on many different platforms.
Permalink | View ViennaCL - Linear Algebra and Iterative Solvers using OpenCL
- OpenCL .Net
-
OpenCL.net doubles as simple bindings to the flat OpenCL 1.0 API, usable from all .net languages, and a higher level framework that simplifies some aspects of OpenCL programming.
Some examples included to jump start development.
MIT open source licensed for maximum flexibility.
Tutorials, Technical Whitepapers and How to Guides
- Levering GPGPU and OpenCL Technologies for Natural User Interfaces
-
Natural User Interfaces (NUIs) are vastly more complex than traditional graphical user interfaces and require large computational power to provide an immersive experience for the user. We will examine NUI improvements and design challenges over traditional Graphical User Interfaces and the associated computational complexities encountered during implementation. In order to maximize the hardware’s capability for a NUI, making use of available Graphics Processing Unit (GPU) cycles to complement the Central Processing Unit (CPU) is crucial. This process of using GPUs as General Purpose Graphics Processing Units (GPGPU) has been traditionally limited to desktop computing platforms, but as portable devices are becoming more powerful, encompassing multiple-core CPU and GPU elements, implementation becomes crucial for efficient use of the hardware’s capability. When effectively utilizing both the GPU and CPU cycles a smooth, fluid experience can be maintained, as well as optimization for best case power consumption. This can be very challenging due to platform constraints, differing CPU / GPU architectures, implementation complexity and cost of integration. We will examine a few aspects of a NUI that could benefit from GPGPU computing and the associated implementation benefits.
Permalink | View Levering GPGPU and OpenCL Technologies for Natural User Interfaces
- OpenCL Tutorial Series
-
This tutorial series from Rob Farber and The Code Project focuses on bringing knowledgeable C and C++ programmers quickly up to speed so they can work with OpenCL to write efficient portable parallel programs.
- Part 1: Portable Parallelism
- Part 2: Memory Spaces
- Part 3: Work-Groups and Synchronization
- Part 4: Coordinating Computations with OpenCL Queues
- Part 5: OpenCL Buffers and Memory Affinity
- Part 6: Primitive Restart and OpenGL Interoperability
- Part 7: OpenCL plugins
- Part 8: Heterogeneous workflows using OpenCL
- Part 9: OpenCL Extensions and Device Fission
- OpenCL accelerated extraction and classification of Haar features with color
-
Computer vision has become pervasive in our modern society, with applications ranging from robotic vision, measurement of position, face identification and recognition, automatic detection of failures in industry and many more. Haar features are commonly used to describe objects.
CMSoft brings a study on how to use OpenCL to accelerate the extraction of color Haar-like wavelet features from color images. This process involves OpenCL acceleration of the computation of the image integral, generation of regions of sliding window in the target picture and preparing data structures to receive all features.
A complete color Haar feature extraction software, including source code, is available.
Permalink | View OpenCL accelerated extraction and classification of Haar features with color
- Anjuta Project Wizards for AMD, NVidia and Intel OpenCL SDK
-
Aiming at increasing the OpenCL developing, I created some wizards to start up an OpenCL application project using the SDK from NVidia, AMD or Intel. I’ve used Anjuta DevStudio on Linux. There is a lack of OpenSource IDE and tools to develop GPU applications, these wizards help us to create OpenCL applications based on templates and, thus, to decrease the learning curve.
Permalink | View Anjuta Project Wizards for AMD, NVidia and Intel OpenCL SDK
- OpenCL quickstart tutorials
-
Quick start OpenCL tutorial with lots of examples.
- CMSoft Image2D Tutorial
-
Image2D variables play a very important role in OpenCL because they use the texture caching and samplers of the GPU and thus are very suitable to store large arrays and/or data that has to be accessed very often.
CMSoft Image2D tutorial covers how to manipulate Image2Ds and how to reinterpret a vector as a Image2D variable, with useful C99 source code to retrieve vector data from a Image2D.
- OpenCL Getting Started Tutorial
-
Part 1
This tutorial series is aimed at developers trying to learn OpenCL from the bottom up, with a focus on practicality (i.e. I’m still learning, I’m sharing what I’ve found to work).
Part 1.5
This part is a reworking of my first tutorial using the OpenCL C++ Bindings.
Part 2
This installment introduces OpenCL context sharing with OpenGL.
- OpenCL / GL Interop Tutorial
-
Using OpenCL to manipulate OpenGL objects has important advantages: the GPU is usually faster and data transfer from Host memory to Device memory is kept to a minimum.
CMSoft OpenCL/GL interop tutorial shows detailed implementation of circular wave interference simulation using CL/GL interop, including commented source code available for download.
- OpenCL Tutorial
-
OpenCL is a great open standard which is going to become the future of parallel processing.
This tutorial shows basics of setting up OpenCL with a pre-made initializer OpenCLTemplate and covers from very basic vector-sum topics to a real-life OpenCL sample application.
This tutorial presents OpenCL C99 sample code.
- GPGPU Programming (OpenCL)
-
This sites primary focus is GPGPU programming. It contains an overview describing the basic concepts, code examples (OpenCL, CUDA), links to useful OpenCL and CUDA resources, links to GPU based products, and news aggregation of GPGPU tools.
- OpenCL Tutorial - Introduction - Fundamentals
-
- Episode 1 - OpenCL Tutorial - Introduction to OpenCL
- Episode 2 - OpenCL Fundamentals
- Episode 3 - Building an OpenCL Project
- Episode 4 - Memory Access and Layout
- Episode 5 - Questions and Answers to Episode Four
- Episode 6 - Shared Memory Kernel Optimization
Permalink | View OpenCL Tutorial - Introduction - Fundamentals
- Introduction to OpenCL tutorial
-
Introductory tutorial showing how to write the ‘Hello World’ in OpenCL.
Presentations & Videos
Example Code
- OpenCL accelerated extraction and classification of Haar features with color
-
Computer vision has become pervasive in our modern society, with applications ranging from robotic vision, measurement of position, face identification and recognition, automatic detection of failures in industry and many more. Haar features are commonly used to describe objects.
CMSoft brings a study on how to use OpenCL to accelerate the extraction of color Haar-like wavelet features from color images. This process involves OpenCL acceleration of the computation of the image integral, generation of regions of sliding window in the target picture and preparing data structures to receive all features.
A complete color Haar feature extraction software, including source code, is available.
Permalink | View OpenCL accelerated extraction and classification of Haar features with color
- floatCL
-
A 2 simple openCL projects that make use of the GPU to find the largest element in an array of floats in O(1) and sort a list O(n). Will be useful for beginners to understand openCL API and writing code for SIMD execution.
- OpenCL Color Tracking
-
Tracking a set of colors in a video is a first approximation and initial guess for many applications. In fact, determining what parts of an image belong to skin, for example, is very important to track faces or hands. CMSoft’s color tracking case study presents a technique that is robust to motion-blur and that can perform real-time tracking thanks to OpenCL acceleration. Source code is provided showing how to implement a flashlight mouse, i.e., how to use the webcam and a flashlight to perform mouse movement and clicking.
- Semaphors using Atomics
-
CMSoft C99 Atomics tutorial covers important aspects of OpenCL atomic functions and shows a practical easy-to-use semaphor implementation through atomic exchange function (source code available).
Atomic operations are a very important aspect of parallel processing and synchronization. Among other uses, they are really useful to manage shared resources and create semaphors.
- Real time filtering with OpenCL
-
This OpenCL example code shows how to filter images without using OpenCL extensions, thus making it suitable for use with any GPU that supports OpenCL while still being much faster than non-GPU accelerated implementations.
Additionally, the source code shows how to execute real time webcam image filtering with a 7x7 filter.
- OpenCL low poly collision detection
-
As part of CMSoft OpenCL tutorial, this source code example shows an implementation of low polygon collision detection algorithm suitable for engineering assembly analises.
OpenGL and Lab3D are used to display the 3D models and OpenCL C99 source code is presented and made available for download.
Utilities & Projects
- OpenCL accelerated extraction and classification of Haar features with color
-
Computer vision has become pervasive in our modern society, with applications ranging from robotic vision, measurement of position, face identification and recognition, automatic detection of failures in industry and many more. Haar features are commonly used to describe objects.
CMSoft brings a study on how to use OpenCL to accelerate the extraction of color Haar-like wavelet features from color images. This process involves OpenCL acceleration of the computation of the image integral, generation of regions of sliding window in the target picture and preparing data structures to receive all features.
A complete color Haar feature extraction software, including source code, is available.
Permalink | View OpenCL accelerated extraction and classification of Haar features with color
- OpenCL Compiler Tools (OCLTools)
-
OCLTools is a powerful, yet compact, suite of tools that provides developers with more alternatives to kernel compilation. OCLTools enables you to eliminate costly kernel compilation time from the runtime of your application. With OCLTools developers can embed the source code of their kernels (clear text or encrypted) directly into their program binaries eliminating the need to distribute kernel source code in the open while still maintaining the flexibility of runtime compilation. Not only can you embed source code into your OpenCL binaries but you can embed precompiled kernels as well effectively eliminating the additional kernel compilation overhead from the run time of your application.
OCLTools comes with an offline OpenCL compiler (oclcc), ELF file generator (oclelf), encryption tool (oclcrypt), and utility library to help streamline the OpenCL kernel compilation process. “The ClusterChimps Guide to Offline OpenCL Compiling and Linking” not only serves as a reference for the tools but it also walks you step by step through each usecase with example code showing you how it’s done.
- 3D Picture Viewer and Converter
-
A very promising trend in the field of photography is the possibility of shooting stereoscopic pairs of pictures for vivid, realistic 3D visualization by using 3D cameras. However, few people have the special equipment to visualize these pictures or software to easily manipulate and convert them to more popular formats.
CMSoft Stereoscopic Picture Editor and Converter is a tool designed to view 3D photographs using OpenGL to render the stereo pair in an animated form called “wiggle stereo”, with zoom and crop capabilities. Advanced users can also create their own custom filters in C language using OpenCL technology.
OpenCL source code used in the filters and sample .MPO images are available.
- OpenCL Environment
-
A series of utilities aimed at making OpenCL easier to use. Includes clCompiler which generates both binary outputs and precompiled headers which can be used in conjunction with clEnvironment. clQuery allows you to print all known information about a OpenCL data type. clPid, clYUV clImgFilter are all examples of how to use the utilities to create a compile time kernel make it a dependency in you makefiles and then use the clEnvironment to call your kernel.
- Lab3D - 3D Laboratory
-
Lab3D is a 3D Laboratory project that uses OpenCL and OpenGL to display and manipulate 3D models created from regular 3D files and mathematical equations.
Some of Lab3D features are OBJ and DXF (AutoCAD) models loading, dynamic and static 3D models creation, stereoscopic visualization and WiiMote interaction.
Buffer objects are used to accelerate animations in systems that support it.
- OpenCL Studio
-
OpenCL Studio is a development environment for high performance computing and visualization using OpenCL and OpenGL. The editor hides much of the complexity of the underlying APIs while providing flexibility via an interactive scripting language. Integrated source code editors for OpenCL, GLSL, and Lua, as well as a toolbox of 2D user interface widgets and an extensible plug-in architecture provide a powerful development framework for a wide range of high performance computing applications.
- OpenCL Kernel Compiler
-
A compiler for OpenCL Kernel files designed to be used during OpenCL application development.
The use of this tool alleviates the need for building compiler diagnostic message retrieval code into applications that use OpenCL. It allows developers to spot compilation errors during source builds instead of at run-time.
