The OpenCL 2.1 revision to the 2.0 standard was released on November 16, 2015. The most notable thing about this release was the introduction of the OpenCL C++ kernel language, such as how the OpenCL language originally was based on C with extensions, the C++ version is based on a subset of C++14, with backwards compatibility for the C kernel language.
Updates to the OpenCL API include the following:
- Subgroups: These enable finer grain control of hardware threading, are now in core, together with additional subgroup query operations for increased flexibility
- Copying of kernel objects and states: clCloneKernel enables copying of kernel objects and state for safe implementation of copy constructors in wrapper classes
- Low-latency device timer queries: These allow for alignment of profiling data between device and host code
- Intermediate SPIR-V code for the runtime:
- A bi-directional translator between LLVM to SPIR-V to enable flexible use of both intermediate languages in tool chains.
- An OpenCL C to LLVM compiler that generates SPIR-V through the above translator.
- A SPIR-V assembler and disassembler.
Standard Portable Intermediate Representation (SPIR) and its successor, SPIR-V, are a way to provide device-independent binaries for use across OpenCL devices.