| 
    vecmem 1.22.0
    
   | 
 
Custom implementation for atomic operations using "POSIX" built-ins. More...
#include <vecmem/memory/details/posix_device_atomic_ref.hpp>
Public Types | |
Type definitions  | |
| typedef T | value_type | 
| Type managed by the object.  | |
| typedef value_type | difference_type | 
| Difference between two objects.  | |
| typedef value_type * | pointer | 
| Pointer to the value in global memory.  | |
| typedef value_type & | reference | 
| Reference to a value given by the user.  | |
Public Member Functions | |
| VECMEM_HOST | posix_device_atomic_ref (reference ref) | 
| Constructor, with a pointer to the managed variable.  | |
| VECMEM_HOST | posix_device_atomic_ref (const posix_device_atomic_ref &parent) | 
| Copy constructor.  | |
| posix_device_atomic_ref & | operator= (const posix_device_atomic_ref &)=delete | 
| Disable the assignment operator.  | |
Value setter/getter functions  | |
| VECMEM_HOST value_type | operator= (value_type data) const | 
| Assigns a value desired to the referenced object.   | |
| VECMEM_HOST void | store (value_type data, memory_order order=memory_order::seq_cst) const | 
| Set the variable to the desired value.  | |
| VECMEM_HOST value_type | load (memory_order order=memory_order::seq_cst) const | 
| Get the value of the variable.  | |
| VECMEM_HOST value_type | exchange (value_type data, memory_order order=memory_order::seq_cst) const | 
| Exchange the current value of the variable with a different one.  | |
| VECMEM_HOST bool | compare_exchange_strong (reference expected, value_type desired, memory_order success, memory_order failure) const | 
| Compare against the current value, and exchange only if different.  | |
| VECMEM_HOST bool | compare_exchange_strong (reference expected, value_type desired, memory_order order=memory_order::seq_cst) const | 
| Compare against the current value, and exchange only if different.  | |
Value modifier functions  | |
| VECMEM_HOST value_type | fetch_add (value_type data, memory_order order=memory_order::seq_cst) const | 
| Add a chosen value to the stored variable.  | |
| VECMEM_HOST value_type | fetch_sub (value_type data, memory_order order=memory_order::seq_cst) const | 
| Substitute a chosen value from the stored variable.  | |
| VECMEM_HOST value_type | fetch_and (value_type data, memory_order order=memory_order::seq_cst) const | 
| Replace the current value with the specified value AND-ed to it.  | |
| VECMEM_HOST value_type | fetch_or (value_type data, memory_order order=memory_order::seq_cst) const | 
| Replace the current value with the specified value OR-d to it.  | |
| VECMEM_HOST value_type | fetch_xor (value_type data, memory_order order=memory_order::seq_cst) const | 
| Replace the current value with the specified value XOR-d to it.  | |
Custom implementation for atomic operations using "POSIX" built-ins.
| T | Type to perform atomic operations on | 
| address | The device address space to use | 
| VECMEM_HOST auto vecmem::posix_device_atomic_ref< T, address >::operator= | ( | value_type | data | ) | const | 
Assigns a value desired to the referenced object.