YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::detail::AtomicCounter< CounterBase, Deleter > Struct Template Reference

#include <atomic_counter.hpp>

Inheritance diagram for yaclib::detail::AtomicCounter< CounterBase, Deleter >:
[legend]
Collaboration diagram for yaclib::detail::AtomicCounter< CounterBase, Deleter >:
[legend]

Public Member Functions

template<typename... Args>
 AtomicCounter (std::size_t n, Args &&... args) noexcept(std::is_nothrow_constructible_v< CounterBase, Args &&... >)
 
YACLIB_INLINE void Add (std::size_t delta) noexcept
 
YACLIB_INLINE void Sub (std::size_t delta) noexcept
 
std::size_t GetRef () const noexcept
 
YACLIB_INLINE bool SubEqual (std::size_t n) noexcept
 

Public Attributes

yaclib_std::atomic_size_t count
 

Detailed Description

template<typename CounterBase, typename Deleter = DefaultDeleter>
struct yaclib::detail::AtomicCounter< CounterBase, Deleter >

Definition at line 13 of file atomic_counter.hpp.

Constructor & Destructor Documentation

◆ AtomicCounter()

template<typename CounterBase , typename Deleter = DefaultDeleter>
template<typename... Args>
yaclib::detail::AtomicCounter< CounterBase, Deleter >::AtomicCounter ( std::size_t  n,
Args &&...  args 
)
inlinenoexcept

Definition at line 15 of file atomic_counter.hpp.

Member Function Documentation

◆ Add()

template<typename CounterBase , typename Deleter = DefaultDeleter>
YACLIB_INLINE void yaclib::detail::AtomicCounter< CounterBase, Deleter >::Add ( std::size_t  delta)
inlinenoexcept

◆ GetRef()

template<typename CounterBase , typename Deleter = DefaultDeleter>
std::size_t yaclib::detail::AtomicCounter< CounterBase, Deleter >::GetRef ( ) const
inlinenoexcept

◆ Sub()

◆ SubEqual()

Member Data Documentation

◆ count


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