MCPcopy Create free account
hub / github.com/dolthub/doltgresql / EncodingPartsForBitLen

Function EncodingPartsForBitLen

postgres/parser/utils/bitarray.go:315–322  ·  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

313// EncodingPartsForBitLen creates a word backing array and the
314// "last bits used" value given the given total number of bits.
315func EncodingPartsForBitLen(bitLen uint) ([]uint64, uint64) {
316 if bitLen == 0 {
317 return nil, 0
318 }
319 numWords, lastBitsUsed := SizesForBitLen(bitLen)
320 words := make([]word, numWords)
321 return words, lastBitsUsed
322}
323
324// SizesForBitLen computes the number of words and last bits used for
325// the requested bit array size.

Callers 3

MakeZeroBitArrayFunction · 0.85
ToWidthMethod · 0.85
ParseFunction · 0.85

Calls 1

SizesForBitLenFunction · 0.85

Tested by

no test coverage detected