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

Function fillArrayANDNOT

util.go:80–95  ·  view source on GitHub ↗
(container []uint16, bitmap1, bitmap2 []uint64)

Source from the content-addressed store, hash-verified

78}
79
80func fillArrayANDNOT(container []uint16, bitmap1, bitmap2 []uint64) {
81 if len(bitmap1) != len(bitmap2) {
82 panic("array lengths don't match")
83 }
84 // TODO: rewrite in assembly
85 pos := 0
86 for k := range bitmap1 {
87 bitset := bitmap1[k] &^ bitmap2[k]
88 for bitset != 0 {
89 t := bitset & -bitset
90 container[pos] = uint16((k*64 + int(popcount(t-1))))
91 pos = pos + 1
92 bitset ^= t
93 }
94 }
95}
96
97func fillArrayXOR(container []uint16, bitmap1, bitmap2 []uint64) {
98 if len(bitmap1) != len(bitmap2) {

Callers 1

andNotBitmapMethod · 0.85

Calls 1

popcountFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…