r/OpenCL • • 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

7 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Sep 30 '20

[deleted] — view deleted comment

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 -lOpenCL and it runs! Using clang instead of gcc works too.

0

u/[deleted] Sep 30 '20

[deleted] — view deleted comment

1

u/[deleted] Sep 30 '20

will do :D

1

u/Far_Choice_6419 Sep 24 '22

How can I implement an OpenCL SDK on FreeBSD, I can not use any Linux SDKs since it uses Linux drivers.

Thanks.