Resources for the Mobile Developer Community
OpenCL Implementations, Tutorials and Sample Code
Commercial and Open Source Implementations
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
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, ...)
The Open Toolkit library
Cross-platform OpenCL, OpenGL and OpenAL bindings for .Net/Mono. Compatible with Windows, Linux and Mac OS X and usable by all .Net languages (including C#, VB.Net, C++/CLI, IronPython and F#).
Utilities & Projects
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 1.0 beta released
OpenCL Studio combines OpenCL and OpenGL into a single integrated development environment that allows you to visualize OpenCL computation using 3D rendering techniques. The editor hides much of the complexity of the underlying APIs while still providing flexibility via the Lua scripting language. Integrated source code editors and debugging capabilities for OpenCL, GLSL, and Lua, as well as a toolbox of 2D user interface widgets provide you with a development framework for a wide range of parallel programming solutions.
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.
Frameworks
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.
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
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 I
Introduction to OpenCL :
Episode I
OpenCL Fundamentals : More in-depth discussion on general concepts that are important for understanding how OpenCL works. OpenCL address spaces are covered as well the basics of executing an OpenCL program (abstractly).
Introduction to OpenCL tutorial
Introductory tutorial showing how to write the ‘Hello World’ in OpenCL.
Presentations & Videos
Sorry, no Presentations or Videos have been uploaded yet. Be the first to upload a presentation video.
Example Code
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.



