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

Method BitLen

pkg/util/bitarray/bitarray.go:76–81  ·  view source on GitHub ↗

BitLen returns the number of bits stored.

()

Source from the content-addressed store, hash-verified

74
75// BitLen returns the number of bits stored.
76func (d BitArray) BitLen() uint {
77 if len(d.words) == 0 {
78 return 0
79 }
80 return d.nonEmptyBitLen()
81}
82
83func (d BitArray) nonEmptyBitLen() uint {
84 return uint(len(d.words)-1)*numBitsPerWord + uint(d.lastBitsUsed)

Callers 8

ToWidthMethod · 0.95
LeftShiftAnyMethod · 0.95
FormatMethod · 0.95
GetBitAtIndexMethod · 0.95
AdjustValueToTypeFunction · 0.80
FormatBitArrayToTypeFunction · 0.80
SetBitAtIndexMethod · 0.80

Calls 1

nonEmptyBitLenMethod · 0.95

Tested by

no test coverage detected