Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
gts::AtomicArithmetic< T > Struct Template Reference

A wrapper class for a stl-like atomic arithmetic specialization. Uses the STL by default. Define GTS_USE_CUSTOM_ATOMICS to add your own backend, or replace everything completely as long as this interface exists. More...

#include <Atomic.h>

Inherits gts::AtomicCommon< T >.

Inherited by gts::Atomic< table_type * >, gts::Atomic< gts::Schedule * >, gts::Atomic< uint32_t >, gts::Atomic< int16_t >, gts::Atomic< RingBuffer * >, gts::Atomic< SubIdType >, gts::Atomic< int32_t >, gts::Atomic< uint8_t >, gts::Atomic< size_t >, gts::Atomic< size_type >, gts::Atomic< uint16_t >, gts::Atomic< OldBuffers * >, gts::Atomic< gts::FreeListNode * >, gts::Atomic< uint64_t >, and gts::Atomic< T >.

Public Member Functions

 AtomicArithmetic (const AtomicArithmetic &)=delete
 
AtomicArithmeticoperator= (const AtomicArithmetic &)=delete
 
AtomicArithmeticoperator= (const AtomicArithmetic &) volatile=delete
 
constexpr AtomicArithmetic (T val)
 
fetch_add (T rhs, gts::memory_order order)
 
fetch_sub (T rhs, gts::memory_order order)
 
fetch_and (T rhs, gts::memory_order order)
 
fetch_or (T rhs, gts::memory_order order)
 
- Public Member Functions inherited from gts::AtomicCommon< T >
 AtomicCommon (const AtomicCommon &)=delete
 
AtomicCommonoperator= (const AtomicCommon &)=delete
 
AtomicCommonoperator= (const AtomicCommon &) volatile=delete
 
constexpr AtomicCommon (T val)
 
void store (T value, gts::memory_order order)
 
load (gts::memory_order order) const
 
exchange (T value, gts::memory_order order)
 
bool compare_exchange_weak (T &expected, T value, gts::memory_order xchgOrder, gts::memory_order loadOrder)
 
bool compare_exchange_strong (T &expected, T value, gts::memory_order xchgOrder, gts::memory_order loadOrder)
 

Additional Inherited Members

- Protected Attributes inherited from gts::AtomicCommon< T >
GTS_ATOMIC_TYPE< T > m_atom
 

Detailed Description

template<typename T>
struct gts::AtomicArithmetic< T >

A wrapper class for a stl-like atomic arithmetic specialization. Uses the STL by default. Define GTS_USE_CUSTOM_ATOMICS to add your own backend, or replace everything completely as long as this interface exists.