atomic_ref< T >

atomic_ref< T >#

stdgpu: stdgpu::atomic_ref< T >
stdgpu Latest
Efficient STL-like Data Structures on the GPU

Detailed Description

template<typename T>
class stdgpu::atomic_ref< T >

A class to model a atomic reference to an object of type T on the GPU.

Template Parameters
TThe type of the atomically managed object

Supported types:

  • unsigned int
  • int
  • unsigned long long int
  • float (experimental)

Differences to std::atomic_ref:

  • Is CopyAssignable
  • All operations (including load() and store()) may follow stricter ordering than requested
  • Additional min and max functions for all supported integer and floating point types
  • Additional increment/decrement + modulo functions for unsigned int

Public Types

using difference_type = value_type
 
using value_type = T