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

atomic_fetch_sub

Global function atomic_sub. Calls sub on SYCL atomic object.


template <typename T, access::address_space addressSpace>
T atomic_fetch_sub(atomic<T, addressSpace> object, T operand, cl::sycl::memory_order mem_order)
(1)
  1. Global function atomic_sub. Calls sub on SYCL atomic object.
    Parameters:
    • atomic<T, addressSpace> object : The atomic object to subtract from
    • T operand
    • cl::sycl::memory_order mem_order : The memory ordering to use. Only memory_order_relaxed
    Returns: The old value of *object

syclreference.com — SYCL Reference Pages

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