📅 2015-Dec-03 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ clew, glew, opencl, opengl ⬩ 📚 Archive
OpenCL Extension Wrangler Library (CLEW) does to OpenCL what GLEW does to OpenGL. It takes out all the pain of dealing with OpenCL libraries from different vendors and on different platforms. The best part is that your code will compile and run even on a computer without a OpenCL device or library. Only when it calls a OpenCL call does it fail.
$ git clone https://github.com/martijnberger/clew.git
$ mkdir build
$ cd build
$ cmake ..
$ make
$ clewTest/clewTest
num platforms: 1
If you have an OpenCL device and OpenCL library installed, then the number of platforms reported will be greater than zero.
clew.h
header file and link with the libclew.so
library file. Call clewInit
at the beginning. After that you can follow with any OpenCL calls.Tried with: NVIDIA 352 drivers, NVIDIA GeForce GTX 750 Ti and Ubuntu 14.04