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

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

Inheritance diagram for grem::AtomicRef< T >:

Public Member Functions

GREM_ALWAYS_INLINE AtomicRef (T &obj)
GREM_ALWAYS_INLINE AtomicRef (const AtomicRef &other) noexcept
GREM_ALWAYS_INLINE value_type operator= (value_type desired) const noexcept
AtomicRef & operator= (const AtomicRef &)=delete
GREM_ALWAYS_INLINE bool is_lock_free () const noexcept
GREM_ALWAYS_INLINE void store (T newValue, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T load (MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T exchange (T newValue, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE bool compare_exchange_weak (T &expected, T desired, MemoryOrder success, MemoryOrder failure) const noexcept
GREM_ALWAYS_INLINE bool compare_exchange_weak (T &expected, T desired, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE bool compare_exchange_strong (T &expected, T desired, MemoryOrder success, MemoryOrder failure) const noexcept
GREM_ALWAYS_INLINE bool compare_exchange_strong (T &expected, T desired, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE void wait (T old, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE void notify_one () noexcept
GREM_ALWAYS_INLINE void notify_all () noexcept
GREM_ALWAYS_INLINE T fetch_add (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T fetch_add (std::ptrdiff_t arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T fetch_sub (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T fetch_sub (std::ptrdiff_t arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T fetch_and (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T fetch_or (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept
GREM_ALWAYS_INLINE T fetch_xor (T arg, MemoryOrder order=MemoryOrder::SEQUENTIALLY_CONSISTENT) const noexcept

Static Public Attributes

static constexpr bool is_always_lock_free = true
static constexpr std::size_t required_alignment = alignof(T)

Constructor & Destructor Documentation

◆ AtomicRef() [1/2]

template<typename T>
GREM_ALWAYS_INLINE grem::AtomicRef< T >::AtomicRef ( T & obj)
inlineexplicit

◆ AtomicRef() [2/2]

template<typename T>
GREM_ALWAYS_INLINE grem::AtomicRef< T >::AtomicRef ( const AtomicRef< T > & other)
inlinenoexcept

Member Function Documentation

◆ operator=() [1/2]

template<typename T>
GREM_ALWAYS_INLINE value_type grem::AtomicRef< T >::operator= ( value_type desired) const
inlinenoexcept

◆ operator=() [2/2]

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

◆ is_lock_free()

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

◆ store()

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

◆ load()

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

◆ exchange()

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

◆ compare_exchange_weak() [1/2]

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

◆ compare_exchange_weak() [2/2]

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

◆ compare_exchange_strong() [1/2]

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

◆ compare_exchange_strong() [2/2]

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

◆ wait()

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

◆ notify_one()

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

◆ notify_all()

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

◆ fetch_add() [1/2]

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

◆ fetch_add() [2/2]

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

◆ fetch_sub() [1/2]

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

◆ fetch_sub() [2/2]

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

◆ fetch_and()

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

◆ fetch_or()

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

◆ fetch_xor()

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

Member Data Documentation

◆ is_always_lock_free

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

◆ required_alignment

template<typename T>
std::size_t grem::AtomicRef< T >::required_alignment = alignof(T)
staticconstexpr

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