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.
                
 | 
            
Member Functions
| (constructor) | |
| 
      
         Atomically compare and optionally exchange expected with *m_data. Calls C++11 equivalent on host, has to be implemented “by hand” on device because OpenCL 1.2 and C++ 11 have different semantics for compare and exchange. If *m_data == expected, performs *m_data = desired and returns true. Otherwise, performs expected = *m_data and returns false.  | 
  |
| 
      
         Atomically exchange operand with *m_data.  | 
  |
| 
      
         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.  | 
  |
| 
      
         Atomically bitwise-and operand with *m_data.  | 
  |
| 
      
         Atomically compare operand to *m_data, storing the larger of the two in *m_data.  | 
  |
| 
      
         Atomically compare operand to *m_data, storing the smaller of the two in *m_data.  | 
  |
| 
      
         Atomically bitwise-or operand with *m_data.  | 
  |
| 
      
         Atomically subtract operand from *m_data.  | 
  |
| 
      
         Atomically bitwise-xor operand with *m_data.  | 
  |
| 
      
         Atomically load from m_data. Calls C++11 equivalent on host, on device it either calls atomic_add with operand = 0, discarding the result.  | 
  |
| 
      
         Atomically store operand in m_data. Calls C++11 equivalent on host, on device it calls exchange, discarding the result.  | 
  |