miloserdow / OpenCL_Hello_World_Cpp

OpenCL "Hello, world" example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenCL "Hello, world" with C++

This is the implementation of OpenCL "Hello, world" using C++ as the language for the host program.

Details

I used OpenCL version 2.1. Error checking is missed in some places — you can add it if needed.

Since some functionality from elder versions of OpenCL is deprecated in that version, I replaced cl::CommandQueue::enqueueTask with cl::CommandQueue::enqueueNDRangeKernel. I did not found any example of such replacement, that is why I publish code.

If you wish to build using Clang in release mode and in a separate folder, run compileClangRelease.sh and then runInBuildDir.sh.

About

OpenCL "Hello, world" example


Languages

Language:C++ 82.1%Language:Shell 7.6%Language:CMake 7.3%Language:C 3.1%