package
0.0.11
Repository: https://github.com/grailbio/base.git
Documentation: pkg.go.dev

# Functions

Clear clears the given bit in a []uintptr bitset.
ClearInterval clears the bits at all positions in [startIdx, limitIdx) in a []uintptr bitset.
NewClearBits creates a []uintptr bitset with capacity for at least nBit bits, and all bits clear.
NewNonzeroWordScanner returns a NonzeroWordScanner for the given bitset, along with the position of the first bit.
NewSetBits creates a []uintptr bitset with capacity for at least nBit bits, and all bits at positions [0, nBit) set.
Set sets the given bit in a []uintptr bitset.
SetInterval sets the bits at all positions in [startIdx, limitIdx) in a []uintptr bitset.
Test returns true iff the given bit is set.

# Constants

BitsPerWord is the number of bits in a machine word.
Log2BitsPerWord is log_2(BitsPerWord).

# Structs

NonzeroWordScanner iterates over and clears the set bits in a bitset, with the somewhat unusual precondition that the number of nonzero words is known in advance.