go/src/internal/runtime/maps/group.go

const maxAvgGroupLoad

const ctrlEmpty

const ctrlDeleted

const bitsetLSB

const bitsetMSB

const bitsetEmpty

const bitsetDeleted

type bitset

// first assumes that only the MSB of each control byte can be set (e.g. bitset
// is the result of matchEmpty or similar) and returns the relative index of the
// first control byte in the group that has the MSB set.
//
// Returns abi.SwissMapGroupSlots if the bitset is empty.
func (b bitset) first() uintptr {}

// removeFirst removes the first set bit (that is, resets the least significant set bit to 0).
func (b bitset) removeFirst() bitset {}

type ctrl

type ctrlGroup

// get returns the i-th control byte.
func (g *ctrlGroup) get(i uintptr) ctrl {}

// set sets the i-th control byte.
func (g *ctrlGroup) set(i uintptr, c ctrl) {}

// setEmpty sets all the control bytes to empty.
func (g *ctrlGroup) setEmpty() {}

// matchH2 returns the set of slots which are full and for which the 7-bit hash
// matches the given value. May return false positives.
func (g ctrlGroup) matchH2(h uintptr) bitset {}

// matchEmpty returns the set of slots in the group that are empty.
func (g ctrlGroup) matchEmpty() bitset {}

// matchEmptyOrDeleted returns the set of slots in the group that are empty or
// deleted.
func (g ctrlGroup) matchEmptyOrDeleted() bitset {}

type groupReference

const ctrlGroupsSize

const groupSlotsOffset

// alignUp rounds n up to a multiple of a. a must be a power of 2.
func alignUp(n, a uintptr) uintptr {}

// alignUpPow2 rounds n up to the next power of 2.
//
// Returns true if round up causes overflow.
func alignUpPow2(n uint64) (uint64, bool) {}

// ctrls returns the group control word.
func (g *groupReference) ctrls() *ctrlGroup {}

// key returns a pointer to the key at index i.
func (g *groupReference) key(typ *abi.SwissMapType, i uintptr) unsafe.Pointer {}

// elem returns a pointer to the element at index i.
func (g *groupReference) elem(typ *abi.SwissMapType, i uintptr) unsafe.Pointer {}

type groupsReference

// newGroups allocates a new array of length groups.
//
// Length must be a power of two.
func newGroups(typ *abi.SwissMapType, length uint64) groupsReference {}

// group returns the group at index i.
func (g *groupsReference) group(typ *abi.SwissMapType, i uint64) groupReference {}