Skip to content
Jonathan's OpenCL Wrapper
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
include/jcl
opencl_cpp_header
src/jcl
tests_jcl
.gitignore
CMakeLists.txt
LICENSE.txt
README.md
jcl.sln
jcl.v11.suo
jcl.vcxproj
jcl.vcxproj.filters
jcl.vcxproj.user

README.md

jcl - Jonathan's OpenCL Wrapper


Overview

This library is a C++ wrapper of OpenCL. I built it to make prototyping OpenCL applications faster and to create a constant and simple interface for building and running OpenCL kernels. OpenCL is amazing but I tend to use a very limited subset of OpenCL's heterogeneous compute features; so this library makes a few simplifying assumptions about memory and kernel usage to make creating an OpenCL context easy (i.e, a one liner).

Compilation

Building jcl uses Visual Studio 2012 on Windows, and cmake + gcc 4.7 (or greater) on Mac OS X.

You will also need a graphics card or CPU driver that supports OpenCL.

For notes on installing the dependencies for jcl:

Windows:

  • Intel SDK (for CPU support)
  • For ATI CARDS:
  • FOR NVIDIA CARDS:
    • Download the NVidia GPU Computing SDK (by getting the CUDA SDK) https://developer.nvidia.com/gpu-computing-sdk (Desktop Windows 7 64bit)
    • Create windows environment variables (right click My Computer -> Properties -> Advanced System Settings -> Environment Variables -> System Variables -> New):
    • Name = OPENCL_INC_DIR, Value = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include
    • Name = OPENCL_LIB_DIR, Value = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\lib\x64
    • Now download the hpp header from http://www.khronos.org/registry/cl/api/1.1/cl.hpp and put it in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include\CL
  • Compiling the library:
    • open jcl.sln
    • right click "test_jcl" in the Solution Explorer -> "Set as StartUp Project"
    • From the file menu: DEBUG -> Start Debugging... (or press F5)
    • TWO tests should run and at the end of each test there should be a "PASSED" printout.

MAC OS X:

  • Just run cmake and then build (all frameworks should be included).
  • cl.hpp doesn't exist by default but there is a copy of it in the local directory opencl_cpp_header.

Style

This project follows the Google C++ style conventions:

http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

You can’t perform that action at this time.