MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / EncodingPartsForBitLen

Function EncodingPartsForBitLen

pkg/util/bitarray/bitarray.go:295–302  ·  view source on GitHub ↗

EncodingPartsForBitLen creates a word backing array and the "last bits used" value given the given total number of bits.

(bitLen uint)

Source from the content-addressed store, hash-verified

293// EncodingPartsForBitLen creates a word backing array and the
294// "last bits used" value given the given total number of bits.
295func EncodingPartsForBitLen(bitLen uint) ([]uint64, uint64) {
296 if bitLen == 0 {
297 return nil, 0
298 }
299 numWords, lastBitsUsed := SizesForBitLen(bitLen)
300 words := make([]word, numWords)
301 return words, lastBitsUsed
302}
303
304// SizesForBitLen computes the number of words and last bits used for
305// the requested bit array size.

Callers 5

MakeZeroBitArrayFunction · 0.85
ToWidthMethod · 0.85
parseFromBinaryFunction · 0.85
parseFromHexFunction · 0.85

Calls 1

SizesForBitLenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…