MCPcopy Create free account
hub / github.com/brimdata/super / Or

Function Or

vector/bitvec/bits.go:134–149  ·  view source on GitHub ↗
(a, b Bits)

Source from the content-addressed store, hash-verified

132}
133
134func Or(a, b Bits) Bits {
135 if b.IsZero() {
136 return a
137 }
138 if a.IsZero() {
139 return b
140 }
141 if a.Len() != b.Len() {
142 panic("or'ing two different length bool vectors")
143 }
144 out := NewFalse(a.Len())
145 for i := range len(a.bits) {
146 out.bits[i] = a.bits[i] | b.bits[i]
147 }
148 return out
149}
150
151func And(a, b Bits) Bits {
152 if a.IsZero() || b.IsZero() {

Callers 1

OrFunction · 0.92

Calls 3

NewFalseFunction · 0.70
LenMethod · 0.65
IsZeroMethod · 0.45

Tested by

no test coverage detected