syclreference.com
  1. SYCL
  2. | API Reference
  3. | Atomics
  4. | atomic
  5. | fetch_add

fetch_add

Atomically add operand to *m_data. param operand the value to add to *m_data. param mem_order the ordering to use. Can only be memory_order_relaxed. return the old value of *m_data.


T fetch_add(T operand, cl::sycl::memory_order mem_order) volatile
(1)
  1. Atomically add operand to *m_data. param operand the value to add to *m_data. param mem_order the ordering to use. Can only be memory_order_relaxed. return the old value of *m_data.
    Parameters:
    • T operand
    • cl::sycl::memory_order mem_order

syclreference.com — SYCL Reference Pages

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