MCPcopy Index your code
hub / github.com/RoaringBitmap/roaring / fillArray

Method fillArray

bitmapcontainer.go:1147–1161  ·  view source on GitHub ↗
(container []uint16)

Source from the content-addressed store, hash-verified

1145}
1146
1147func (bc *bitmapContainer) fillArray(container []uint16) {
1148 // TODO: rewrite in assembly
1149 pos := 0
1150 base := 0
1151 for k := 0; k < len(bc.bitmap); k++ {
1152 bitset := bc.bitmap[k]
1153 for bitset != 0 {
1154 t := bitset & -bitset
1155 container[pos] = uint16((base + int(popcount(t-1))))
1156 pos = pos + 1
1157 bitset ^= t
1158 }
1159 base += 64
1160 }
1161}
1162
1163// NextSetBit returns the next set bit e.g the next int packed into the bitmaparray
1164func (bc *bitmapContainer) NextSetBit(i uint) int {

Callers 2

loadDataMethod · 0.80
resetToMethod · 0.80

Calls 1

popcountFunction · 0.70

Tested by

no test coverage detected