Template Class MonotonicCounter

Class Documentation

template<MemoryScope scope_ = MemoryScope::SYSTEM, std::memory_order order_ = std::memory_order_seq_cst, typename SIntType_ = int, typename enable_ = std::enable_if_t<std::is_integral<SIntType_>::value && std::is_signed<SIntType_>::value>>
class MonotonicCounter

Public Types

typedef SIntType_ counter_int_type

Public Functions

__host__ MonotonicCounter()
__host__ ~MonotonicCounter() = default
__host__ MonotonicCounter(MonotonicCounter&) = delete
__host__ MonotonicCounter &operator=(const MonotonicCounter&) = delete
__host__ MonotonicCounter(MonotonicCounter&&) = default
__host__ __device__ SIntType_ Value() const noexcept
__host__ __device__ void Increment(SIntType_ amount) noexcept
__host__ __device__ void Check(SIntType_ val) const noexcept
__host__ __device__ bool Appoint(SIntType_ *val, SIntType_ num) noexcept
__host__ __device__ void Reset() noexcept