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

Function resetBitmapRange

util.go:145–160  ·  view source on GitHub ↗
(bitmap []uint64, start int, end int)

Source from the content-addressed store, hash-verified

143}
144
145func resetBitmapRange(bitmap []uint64, start int, end int) {
146 if start >= end {
147 return
148 }
149 firstword := start / 64
150 endword := (end - 1) / 64
151 if firstword == endword {
152 bitmap[firstword] &= ^((^uint64(0) << uint(start%64)) & (^uint64(0) >> (uint(-end) % 64)))
153 return
154 }
155 bitmap[firstword] &= ^(^uint64(0) << uint(start%64))
156 for i := firstword + 1; i < endword; i++ {
157 bitmap[i] = 0
158 }
159 bitmap[endword] &= ^(^uint64(0) >> (uint(-end) % 64))
160}
161
162func setBitmapRange(bitmap []uint64, start int, end int) {
163 if start >= end {

Callers 3

iandNotRun16Method · 0.85
resetToMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…