( opBits func(v uint64, mask uint64) bool, opWord func(v uint64) bool, i0 int, i1 int, )
| 113 | } |
| 114 | |
| 115 | func (b *BitArray) isAny( |
| 116 | opBits func(v uint64, mask uint64) bool, |
| 117 | opWord func(v uint64) bool, |
| 118 | i0 int, |
| 119 | i1 int, |
| 120 | ) bool { |
| 121 | idx0, off0 := ioff(i0) |
| 122 | idx1, off1 := ioff(i1) |
| 123 | if idx0 == idx1 { |
| 124 | mask := upperMask(off0) & lowerMask(off1) |
| 125 | return opBits(b.vs[idx0], mask) |
| 126 | } |
| 127 | if off0 != 0 { |
| 128 | if opBits(b.vs[idx0], upperMask(off0)) { |
| 129 | return true |
| 130 | } |
| 131 | idx0++ |
| 132 | } |
| 133 | if off1 != 63 { |
| 134 | if opBits(b.vs[idx1], lowerMask(off1)) { |
| 135 | return true |
| 136 | } |
| 137 | idx1-- |
| 138 | } |
| 139 | for idx := idx0; idx <= idx1; idx++ { |
| 140 | if opWord(b.vs[idx]) { |
| 141 | return true |
| 142 | } |
| 143 | } |
| 144 | return false |
| 145 | } |
| 146 | |
| 147 | func opRange( |
| 148 | opBits func(idx int, off1 uint32, off2 uint32), |
no test coverage detected