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

Function fillArrayAND

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

Source from the content-addressed store, hash-verified

61}
62
63func fillArrayAND(container []uint16, bitmap1, bitmap2 []uint64) {
64 if len(bitmap1) != len(bitmap2) {
65 panic("array lengths don't match")
66 }
67 // TODO: rewrite in assembly
68 pos := 0
69 for k := range bitmap1 {
70 bitset := bitmap1[k] & bitmap2[k]
71 for bitset != 0 {
72 t := bitset & -bitset
73 container[pos] = uint16((k*64 + int(popcount(t-1))))
74 pos = pos + 1
75 bitset ^= t
76 }
77 }
78}
79
80func fillArrayANDNOT(container []uint16, bitmap1, bitmap2 []uint64) {
81 if len(bitmap1) != len(bitmap2) {

Callers 1

andBitmapMethod · 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…