Skip to content

Instantly share code, notes, and snippets.

@sheldonh
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save sheldonh/ee00d5783facd4d4822b to your computer and use it in GitHub Desktop.

Select an option

Save sheldonh/ee00d5783facd4d4822b to your computer and use it in GitHub Desktop.
OpenCL Development Setup
# Install the stuff
sudo yum groupinstall "Development Tools" "Development Libraries"
sudo yum install cmake cmake-gui subversion gcc gcc-c++ opencl-headers pocl
# Get the book and make a build directory
cd /home/joshng
svn checkout http://opencl-book-samples.googlecode.com/svn/trunk/ opencl-book-samples-read-only
mkdir opencl-build
# Run cmake-gui
cmake-gui
# In cmake-gui...
* Make /home/joshng/opencl-book-samples-read-only the source directory.
* Make /home/joshng/opencl-build the build directory.
* Click on Configure.
* Get an error.
* Put /lib/libOpenCL.so.1 in OPENCL_LIBRARIES.
* Click on Configure.
* Get no error.
* Click on Generate.
* Quite cmake-gui.
# Now for the build...
cd /home/joshng/opencl-build
make HelloWorld
# Now for the numbers
cd /home/joshng/opencl-build/src/Chapter_2/HelloWorld
./HelloWorld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment