|Home > OpenCL 2.0 > OpenCL 2.0 functions > OpenCL 2.0 built-in functions|
Several new built-in functions are added in OpenCL 2.0.
OpenCL 2.0 adds many functions for atomic operations, compatible with the C11 standard.
Atomic functions are useful for both when multiple threads on the GPU access the same data, and when GPU and CPU use shared data via SVM in fine-grained mode.
The following table shows examples of the main types of atomic functions:
Table F-2 Atomic operation functions
||Add a value to an object, return the value of object before the addition.|
||Subtract a value from an object, return the value before the subtraction.|
||Load, that is, fetch the value of the atomic object.|
||Store a new value in an atomic object.|
||Compare the value of an atomic object to an expected value, and
replace with the desired if a match. Returns true
||Same as previously, but can sometimes fail even if the object matches the desired value.|
||Atomically fetch the current flag value, set it to true (1) and return the value before it was set.|
Device execution functions support creating new work, creating, setting, and destroying events. They also support constructing ndrange sets.
The following functions support device execution:
Functions for pipes enable the CL kernel to read, write individual or multiple packets, and check the current status of a pipe.
The following functions support pipes: