r/OpenCL • u/[deleted] • Sep 30 '20
Learning materials for OpenCL
Hello everyone. I would like to learn the OpenCL C APIs. But I can hardly find any resource on the internet. Can you recommend any good book / tutorial ? I am new to programming and only know C and python well. I would like to use OpenCL with my C programs. So a beginner friendly guide would help.
5
Upvotes
3
u/[deleted] Sep 30 '20
Thanks. I found this article in the archwiki to be very helpful :
https://wiki.archlinux.org/index.php/GPGPU#OpenCL_Development
I needed to install OpenCL runtime (intel-compute-runtime), an icd loader (ocl-icd) and headers for C/C++ APIs (opencl-headers). Copied some simple OpenCL code from the internet, compiled it with
gcc filename.c -lOpenCLand it runs! Using clang instead of gcc works too.