25 #include <boost/noncopyable.hpp> 49 bool set(
size_t idx, std::memory_order
order = std::memory_order_seq_cst);
58 bool reset(
size_t idx, std::memory_order order = std::memory_order_seq_cst);
73 std::memory_order order = std::memory_order_seq_cst);
78 bool test(
size_t idx, std::memory_order order = std::memory_order_seq_cst)
89 constexpr
size_t size()
const {
95 #if (ATOMIC_LLONG_LOCK_FREE == 2) 97 #elif (ATOMIC_LONG_LOCK_FREE == 2) 106 std::numeric_limits<BlockType>::digits;
117 static constexpr BlockType
kOne = 1;
119 std::array<AtomicBlockType, N>
data_;
143 return value ?
set(idx,
order) :
reset(idx, order);
bool reset(size_t idx, std::memory_order order=std::memory_order_seq_cst)
constexpr size_t size() const
bool operator[](size_t idx) const
—— Concurrent Priority Queue Implementation ——
static constexpr size_t kBitsPerBlock
bool test(size_t idx, std::memory_order order=std::memory_order_seq_cst) const
static constexpr BlockType kOne
std::array< AtomicBlockType, N > data_
static constexpr size_t blockIndex(size_t bit)
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
static constexpr size_t bitOffset(size_t bit)
bool set(size_t idx, std::memory_order order=std::memory_order_seq_cst)
std::atomic< BlockType > AtomicBlockType