top of page

What is OpenCL?

OpenCL is a successful general purpose compute API to abstract hardware differences away from developer which gives a kernel a "write once, run everywhere" flexibility. Same code does same thing in a CPU or a GPU or a different vendor's GPU. 

With the humanity's ever-increasing need of general purpose compute volume, Khronos Group has decided to push a royalty-free standard to be implemented by all global vendors. It is cross-platform and highly available in processor ecosystem(CPU,GPU,FPGA) as of year 2017. Many programming languages received their shares of OpenCL, many hardware vendors implemented the API and it has nearly closed the gap between CUDA, if not crossed already, with the addition of its new versions up to 2.2. 

To use OpenCL in a program, one must compile its bindings(of C++ for example) on the project. The necessary header files are found in this link:

There are some key features of OpenCL, to see a program engaging warp speed. For example, atomic functions let a kernel running on GPU accomplish a serial multi-workitem-spanning task without CPU intervention. 

Asynchronous Work Functions

Out-of-order Command Queues

Multiple Command Queues

Zero-Copy Buffer Access

Device Fission

bottom of page