4 #include "../datastructures/Bitset.h"
16 mutable std::mutex mMutex;
17 #define IDPOOL_LOCK std::lock_guard<std::mutex> lock(mMutex)
41 void free(std::size_t
id) {
carl is the main namespace for the library.
This class is a simple wrapper around boost::dynamic_bitset.
static constexpr auto bits_per_block
Number of bits in each storage block.
auto num_blocks() const
Retrieves the number of blocks used to store mData.
std::size_t find_first() const
Retrieves the index of the first bit that is set to true.
auto resize(std::size_t num_bits, bool value) const
Resize the Bitset to hold at least num_bits bits. New bits are set to the given value.
Bitset & reset(std::size_t n)
Resets a bit to false.
static constexpr auto npos
Sentinel element for iteration.
Bitset & set(std::size_t n, bool value=true)
Sets the given bit to a value, true by default.
auto size() const
Retrieves the size of mData.
friend std::ostream & operator<<(std::ostream &os, const IDPool &p)
std::size_t largestID() const
void free(std::size_t id)