GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::Atomic< T > Class Template Reference

#include <GREM/core/system/synchronization.hpp>

Inheritance diagram for grem::Atomic< T >:

Public Member Functions

constexpr Atomic () noexcept(std::is_nothrow_default_constructible_v< T >)=default
GREM_ALWAYS_INLINE Atomic (T value) noexcept
 Atomic (const Atomic &)=delete
Atomic & operator= (const Atomic &)=delete
Atomic & operator= (const Atomic &) volatile =delete
GREM_ALWAYS_INLINE bool is_lock_free () const noexcept
GREM_ALWAYS_INLINE bool is_lock_free () const volatile noexcept
GREM_ALWAYS_INLINE void store (T newValue, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE void store (T newValue, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE T load (MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T load (MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const volatile noexcept
GREM_ALWAYS_INLINE T exchange (T newValue, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE T exchange (T newValue, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE bool compare_exchange_weak (T &expected, T desired, MemoryOrder success, MemoryOrder failure) noexcept
GREM_ALWAYS_INLINE bool compare_exchange_weak (T &expected, T desired, MemoryOrder success, MemoryOrder failure) volatile noexcept
GREM_ALWAYS_INLINE bool compare_exchange_weak (T &expected, T desired, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE bool compare_exchange_weak (T &expected, T desired, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE bool compare_exchange_strong (T &expected, T desired, MemoryOrder success, MemoryOrder failure) noexcept
GREM_ALWAYS_INLINE bool compare_exchange_strong (T &expected, T desired, MemoryOrder success, MemoryOrder failure) volatile noexcept
GREM_ALWAYS_INLINE bool compare_exchange_strong (T &expected, T desired, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE bool compare_exchange_strong (T &expected, T desired, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE void wait (T old, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE void wait (T old, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const volatile noexcept
GREM_ALWAYS_INLINE void notify_one () noexcept
GREM_ALWAYS_INLINE void notify_one () volatile noexcept
GREM_ALWAYS_INLINE void notify_all () noexcept
GREM_ALWAYS_INLINE void notify_all () volatile noexcept
GREM_ALWAYS_INLINE T fetch_add (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE T fetch_add (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE T fetch_add (std::ptrdiff_t arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE T fetch_add (std::ptrdiff_t arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE T fetch_sub (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE T fetch_sub (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE T fetch_sub (std::ptrdiff_t arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE T fetch_sub (std::ptrdiff_t arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE T fetch_and (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE T fetch_and (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE T fetch_or (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE T fetch_or (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept
GREM_ALWAYS_INLINE T fetch_xor (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) noexcept
GREM_ALWAYS_INLINE T fetch_xor (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) volatile noexcept

Static Public Attributes

static constexpr bool is_always_lock_free = true

Constructor & Destructor Documentation

◆ Atomic() [1/3]

template<typename T>
grem::Atomic< T >::Atomic ( ) const
constexprdefaultnoexcept

◆ Atomic() [2/3]

template<typename T>
GREM_ALWAYS_INLINE grem::Atomic< T >::Atomic ( T value)
inlinenoexcept

◆ Atomic() [3/3]

template<typename T>
grem::Atomic< T >::Atomic ( const Atomic< T > & )
delete

Member Function Documentation

◆ operator=() [1/2]

template<typename T>
Atomic & grem::Atomic< T >::operator= ( const Atomic< T > & )
delete

◆ operator=() [2/2]

template<typename T>
Atomic & grem::Atomic< T >::operator= ( const Atomic< T > & ) volatile
delete

◆ is_lock_free() [1/2]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::is_lock_free ( ) const
inlinenodiscardnoexcept

◆ is_lock_free() [2/2]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::is_lock_free ( ) const volatile
inlinenodiscardnoexcept

◆ store() [1/2]

template<typename T>
GREM_ALWAYS_INLINE void grem::Atomic< T >::store ( T newValue,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ store() [2/2]

template<typename T>
GREM_ALWAYS_INLINE void grem::Atomic< T >::store ( T newValue,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ load() [1/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::load ( MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT) const
inlinenodiscardnoexcept

◆ load() [2/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::load ( MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT) const volatile
inlinenodiscardnoexcept

◆ exchange() [1/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::exchange ( T newValue,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenodiscardnoexcept

◆ exchange() [2/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::exchange ( T newValue,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenodiscardnoexcept

◆ compare_exchange_weak() [1/4]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::compare_exchange_weak ( T & expected,
T desired,
MemoryOrder success,
MemoryOrder failure )
inlinenoexcept

◆ compare_exchange_weak() [2/4]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::compare_exchange_weak ( T & expected,
T desired,
MemoryOrder success,
MemoryOrder failure ) volatile
inlinenoexcept

◆ compare_exchange_weak() [3/4]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::compare_exchange_weak ( T & expected,
T desired,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ compare_exchange_weak() [4/4]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::compare_exchange_weak ( T & expected,
T desired,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ compare_exchange_strong() [1/4]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::compare_exchange_strong ( T & expected,
T desired,
MemoryOrder success,
MemoryOrder failure )
inlinenoexcept

◆ compare_exchange_strong() [2/4]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::compare_exchange_strong ( T & expected,
T desired,
MemoryOrder success,
MemoryOrder failure ) volatile
inlinenoexcept

◆ compare_exchange_strong() [3/4]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::compare_exchange_strong ( T & expected,
T desired,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ compare_exchange_strong() [4/4]

template<typename T>
GREM_ALWAYS_INLINE bool grem::Atomic< T >::compare_exchange_strong ( T & expected,
T desired,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ wait() [1/2]

template<typename T>
GREM_ALWAYS_INLINE void grem::Atomic< T >::wait ( T old,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) const
inlinenoexcept

◆ wait() [2/2]

template<typename T>
GREM_ALWAYS_INLINE void grem::Atomic< T >::wait ( T old,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) const volatile
inlinenoexcept

◆ notify_one() [1/2]

template<typename T>
GREM_ALWAYS_INLINE void grem::Atomic< T >::notify_one ( )
inlinenoexcept

◆ notify_one() [2/2]

template<typename T>
GREM_ALWAYS_INLINE void grem::Atomic< T >::notify_one ( ) volatile
inlinenoexcept

◆ notify_all() [1/2]

template<typename T>
GREM_ALWAYS_INLINE void grem::Atomic< T >::notify_all ( )
inlinenoexcept

◆ notify_all() [2/2]

template<typename T>
GREM_ALWAYS_INLINE void grem::Atomic< T >::notify_all ( ) volatile
inlinenoexcept

◆ fetch_add() [1/4]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_add ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ fetch_add() [2/4]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_add ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ fetch_add() [3/4]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_add ( std::ptrdiff_t arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ fetch_add() [4/4]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_add ( std::ptrdiff_t arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ fetch_sub() [1/4]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_sub ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ fetch_sub() [2/4]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_sub ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ fetch_sub() [3/4]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_sub ( std::ptrdiff_t arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ fetch_sub() [4/4]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_sub ( std::ptrdiff_t arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ fetch_and() [1/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_and ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ fetch_and() [2/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_and ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ fetch_or() [1/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_or ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ fetch_or() [2/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_or ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

◆ fetch_xor() [1/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_xor ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT )
inlinenoexcept

◆ fetch_xor() [2/2]

template<typename T>
GREM_ALWAYS_INLINE T grem::Atomic< T >::fetch_xor ( T arg,
MemoryOrder order = MemoryOrder::SEQUENTIALLY_CONSISTENT ) volatile
inlinenoexcept

Member Data Documentation

◆ is_always_lock_free

template<typename T>
bool grem::Atomic< T >::is_always_lock_free = true
staticconstexpr

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