OpenCL library

However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.

The OpenCL ICD model

OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.
In practice, this is implemented using the Installable Client Driver (ICD) model.
The center point of this model is the libCL library which in fact imeplements ICD Loader.
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.

Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:

extra/Template:Package Official by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. Its behaviour with OpenCL 1.1 code has not been tested as of yet.

unsupported/Template:Package AUR by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.

(There is also Intel's libCL, this one is currently not provided in a separate package though.)

Note: ICD Loader's vendor is mentioned only to identify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably(as long as they are implemented correctly)

For basic usage, extra/libcl is recommended as its installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.

Implementations

To see which OpenCL implementations are currently active on your system, use the following command:
Template:Cli

AMD

OpenCL implementation from AMD is known as AMD APP SDK, formerly also known as AMD Stream SDK or ATi Stream.

Nvidia

Intel

The Intel implementation, named simply Intel OpenCL SDK,
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: Template:Package AUR.

Development

For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the Template:Package Official package is needed. Link your code against libOpenCL.