Hey there! This is the repository with the code I used in the OpenCL tutorial video on my channel. Check it out here:
- Download the repo in whichever way you like.
- Install the OpenCL binaries on your system. You can get them for AMD: https://github.com/GPUOpen-LibrariesAndSDKs/OCL-SDK/releases , for Intel: http://software.intel.com/en-us/vcsource/tools/opencl-sdk , or for Nvidia: https://developer.nvidia.com/cuda-downloads.
- Open the repo in Visual Studio 2019 or above.
- Go into the project properties -> Linker -> General -> Additional library directories, and add the directory containing your OpenCL binaries.
- Then go to project properties -> Linker -> Input -> Additional dependencies, and add the OpenCL binary. (usually 'OpenCL.lib')
- Make sure that project properties -> C/C++ -> General -> Additional include directories, still contains the lib\OpenCL\Include folder.
- Build/Run the program like normal in VS.
- You can also build this project without VS. Just make sure that you link/include OpenCL properly, and that vectorsum.cl is in the same directory as your executable.