Template Numerical Library version\ main:63efd81
Loading...
Searching...
No Matches
TNL::Atomic< T, Devices::Host > Class Template Reference

Atomic wrapper for the host device. More...

#include <TNL/Atomic.h>

Inheritance diagram for TNL::Atomic< T, Devices::Host >:
[legend]
Collaboration diagram for TNL::Atomic< T, Devices::Host >:
[legend]

Public Member Functions

 Atomic () noexcept=default
 Default constructor.
 Atomic (const Atomic &desired) noexcept
 Copy constructor.
fetch_max (T value) noexcept
 Atomically updates the stored value to the maximum of the current value and value.
fetch_min (T value) noexcept
 Atomically updates the stored value to the minimum of the current value and value.
Atomicoperator= (const Atomic &desired) noexcept
 Copy assignment operator.
Public Member Functions inherited from std::atomic< T >
atomic (T... args)
compare_exchange_strong (T... args)
compare_exchange_weak (T... args)
exchange (T... args)
fetch_add (T... args)
fetch_and (T... args)
fetch_or (T... args)
fetch_sub (T... args)
fetch_xor (T... args)
is_lock_free (T... args)
load (T... args)
operator T (T... args)
operator&= (T... args)
operator++ (T... args)
operator++(int) (T... args)
operator+= (T... args)
operator-- (T... args)
operator--(int) (T... args)
operator-= (T... args)
operator= (T... args)
operator^= (T... args)
operator|= (T... args)
store (T... args)

Additional Inherited Members

Public Attributes inherited from std::atomic< T >
ptr
 STL member.

Detailed Description

template<typename T>
class TNL::Atomic< T, Devices::Host >

Atomic wrapper for the host device.

Extends std::atomic<T> with copyability and atomic fetch_max / fetch_min operations. The copy operations are not atomic; they synchronize only with respect to one or the other object.


The documentation for this class was generated from the following file: