|
perfc 0.11.0
|
Non-integrals w/o timestamp Partial specialization matching void clocks and non-integral T's. More...
#include <perfc/counter.hpp>
Non-integrals w/o timestamp Partial specialization matching void clocks and non-integral T's.
Satisfies AtomicCounter requirements.
Definition at line 286 of file counter.hpp.
Public Types | |
| using | ClockType = void |
| using | TimePointType = void |
| using | ValueType = T |
| using | CounterType = std::atomic<ValueType> |
Public Member Functions | |
| Counter () noexcept | |
Construct with value-initialized T (T()) | |
| Counter (T value) noexcept | |
| Initialze with provided value. | |
| Counter (Counter const &)=delete | |
| bool | IsLockFree () const noexcept |
| Query if operations are lock free. | |
| void | Store (T value, MemoryOrder order=MemoryOrder::Release) noexcept |
| Store value in counter. | |
| ValueType | Load (MemoryOrder order=MemoryOrder::Acquire) const noexcept |
| Load value from counter. | |
Static Public Attributes | |
| static constexpr bool | IS_ALWAYS_LOCK_FREE = CounterType::is_always_lock_free |
| Is true if counter is always lock free. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| enum | MemoryOrder |
| Memory ordering constraints. More... | |
| using perfc::Counter< T, void, typename std::enable_if<!std::is_integral< T >::value >::type >::ClockType = void |
Definition at line 288 of file counter.hpp.
| using perfc::Counter< T, void, typename std::enable_if<!std::is_integral< T >::value >::type >::CounterType = std::atomic<ValueType> |
Definition at line 291 of file counter.hpp.
| using perfc::Counter< T, void, typename std::enable_if<!std::is_integral< T >::value >::type >::TimePointType = void |
Definition at line 289 of file counter.hpp.
| using perfc::Counter< T, void, typename std::enable_if<!std::is_integral< T >::value >::type >::ValueType = T |
Definition at line 290 of file counter.hpp.
|
inlineexplicitnoexcept |
Construct with value-initialized T (T())
Definition at line 300 of file counter.hpp.
|
inlineexplicitnoexcept |
Initialze with provided value.
| value | Initial value. |
Definition at line 308 of file counter.hpp.
|
delete |
|
inlinenoexcept |
Query if operations are lock free.
Definition at line 318 of file counter.hpp.
|
inlinenodiscardnoexcept |
Load value from counter.
| order | Memory order constraints. |
Definition at line 338 of file counter.hpp.
|
inlinenoexcept |
Store value in counter.
| value | New counter value to store. |
| order | Memory order constraints. |
Definition at line 328 of file counter.hpp.
|
Memory ordering constraints.
Definition at line 81 of file counter.hpp.
|
staticconstexpr |
Is true if counter is always lock free.
Definition at line 295 of file counter.hpp.