syclreference.com
  1. SYCL
  2. | API Reference
  3. | Atomics

Atomics

Types

Type Definition Notes
atomic_float
atomic<cl::sycl::cl_float>

atomic float object with default global address space

atomic_int
atomic<cl::sycl::cl_int>

atomic int object with default global address space

atomic_uint
atomic<cl::sycl::cl_uint>

atomic unsigned int object with default global address space

Enumerations

memory_order

Only relaxed memory order is supported in SYCL 1.2.1

Classes

atomic<T, addressSpace>

Implementation of the SYCL atomic class according to 1.2 spec. (section 3.8). On host, calls C++ atomic functions on an std::atomic; on device uses SPIR-mangled OpenCL 1.2 functions to achieve same result.

device_type<elemT, addressSpace>
get_atomic_address_space<access::target::local>

Retrieves the address space, suitable for use in an atomic, from the access::target::local access target

get_atomic_address_space<accessTarget>

Retrieves the address space, suitable for use in an atomic, from the access target.

Functions

atomic_compare_exchange_strong

Global function atomic_compare_exchange. Calls compare_exchange on SYCL atomic object.

atomic_exchange

Global function atomic_exchange. Calls exchange on SYCL atomic object.

atomic_fetch_add

Global function atomic_add. Calls add on SYCL atomic object.

atomic_fetch_and

Global function atomic_and. Calls and on SYCL atomic object.

atomic_fetch_max

Global function atomic_max. Calculates max(object, operand), storing the result in object.

atomic_fetch_min

Global function atomic_min. Calculates min(object, operand), storing the result in object.

atomic_fetch_or

Global function atomic_or. Calls or on SYCL atomic object.

atomic_fetch_sub

Global function atomic_sub. Calls sub on SYCL atomic object.

atomic_fetch_xor

Global function atomic_xor. Calls xor on SYCL atomic object.

atomic_load

Returns *object

atomic_store

Global function atomic_store. Calls store on SYCL atomic object.

syclreference.com — SYCL Reference Pages

Last updated: 2019-01-24 00:24:52 +0000