Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
bitset.h File Reference
#include <util/check.h>
#include <util/overflow.h>
#include <array>
#include <bit>
#include <cstdint>
#include <limits>
#include <type_traits>
Include dependency graph for bitset.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bitset_detail::IntBitSet< I >
 A bitset implementation backed by a single integer of type I. More...
class  bitset_detail::IntBitSet< I >::IteratorEnd
 Dummy type to return using end(). More...
class  bitset_detail::IntBitSet< I >::Iterator
 Iterator type returned by begin(), which efficiently iterates all 1 positions. More...
class  bitset_detail::MultiIntBitSet< I, N >
 A bitset implementation backed by N integers of type I. More...
class  bitset_detail::MultiIntBitSet< I, N >::IteratorEnd
 Dummy type to return using end(). More...
class  bitset_detail::MultiIntBitSet< I, N >::Iterator
 Iterator type returned by begin(), which efficiently iterates all 1 positions. More...

Namespaces

namespace  bitset_detail

Typedefs

template<unsigned BITS>
using BitSet

Functions

template<typename I>
unsigned constexpr bitset_detail::PopCount (I v)
 Count the number of bits set in an unsigned integer type.

Typedef Documentation

◆ BitSet

template<unsigned BITS>
using BitSet
Initial value:
std::conditional_t<(BITS <= 32), bitset_detail::IntBitSet<uint32_t>,
std::conditional_t<(BITS <= std::numeric_limits<size_t>::digits), bitset_detail::IntBitSet<size_t>,
bitset_detail::MultiIntBitSet<size_t, CeilDiv(BITS, size_t{std::numeric_limits<size_t>::digits})>>>
A bitset implementation backed by a single integer of type I.
Definition bitset.h:64
A bitset implementation backed by N integers of type I.
Definition bitset.h:230
constexpr auto CeilDiv(const Dividend dividend, const Divisor divisor)
Integer ceiling division (for unsigned values).
Definition overflow.h:70

Definition at line 524 of file bitset.h.