Upstream kelindar/bitmap state of the touched files before 7c356f442d
This commit is contained in:
1 parent
666c48ccf8
commit
58b05bdfdd
4 files changed
+12
-139
No files matched your search
+8
-28
@@ -83,26 +83,16 @@ func (dst *Bitmap) Or(other Bitmap, extra ...Bitmap) {
|
||||
case 0:
|
||||
_or(unsafe.Pointer(&(*dst)[0]), unsafe.Pointer(&other[0]), uint64(len(other)))
|
||||
default:
|
||||
// _or_many applies one word count to every input, so it only fits
|
||||
// sources that share a length; ragged ones are folded in one by one.
|
||||
if n := uniformLen(other, extra); n > 0 {
|
||||
vx, _ := pointersOf(other, extra)
|
||||
_or_many(unsafe.Pointer(&(*dst)[0]), vx, dimensionsOf(n, len(extra)+1))
|
||||
} else {
|
||||
foldEach(dst, _or, other, extra)
|
||||
}
|
||||
vx, max := pointersOf(other, extra)
|
||||
_or_many(unsafe.Pointer(&(*dst)[0]), vx, dimensionsOf(max, len(extra)+1))
|
||||
}
|
||||
case isAVX512:
|
||||
switch len(extra) {
|
||||
case 0:
|
||||
_or_avx512(unsafe.Pointer(&(*dst)[0]), unsafe.Pointer(&other[0]), uint64(len(other)))
|
||||
default:
|
||||
if n := uniformLen(other, extra); n > 0 {
|
||||
vx, _ := pointersOf(other, extra)
|
||||
_or_many_avx512(unsafe.Pointer(&(*dst)[0]), vx, dimensionsOf(n, len(extra)+1))
|
||||
} else {
|
||||
foldEach(dst, _or_avx512, other, extra)
|
||||
}
|
||||
vx, max := pointersOf(other, extra)
|
||||
_or_many_avx512(unsafe.Pointer(&(*dst)[0]), vx, dimensionsOf(max, len(extra)+1))
|
||||
}
|
||||
default:
|
||||
or(*dst, other, extra)
|
||||
@@ -123,26 +113,16 @@ func (dst *Bitmap) Xor(other Bitmap, extra ...Bitmap) {
|
||||
case 0:
|
||||
_xor(unsafe.Pointer(&(*dst)[0]), unsafe.Pointer(&other[0]), uint64(len(other)))
|
||||
default:
|
||||
// _xor_many applies one word count to every input, so it only fits
|
||||
// sources that share a length; ragged ones are folded in one by one.
|
||||
if n := uniformLen(other, extra); n > 0 {
|
||||
vx, _ := pointersOf(other, extra)
|
||||
_xor_many(unsafe.Pointer(&(*dst)[0]), vx, dimensionsOf(n, len(extra)+1))
|
||||
} else {
|
||||
foldEach(dst, _xor, other, extra)
|
||||
}
|
||||
vx, max := pointersOf(other, extra)
|
||||
_xor_many(unsafe.Pointer(&(*dst)[0]), vx, dimensionsOf(max, len(extra)+1))
|
||||
}
|
||||
case isAVX512:
|
||||
switch len(extra) {
|
||||
case 0:
|
||||
_xor_avx512(unsafe.Pointer(&(*dst)[0]), unsafe.Pointer(&other[0]), uint64(len(other)))
|
||||
default:
|
||||
if n := uniformLen(other, extra); n > 0 {
|
||||
vx, _ := pointersOf(other, extra)
|
||||
_xor_many_avx512(unsafe.Pointer(&(*dst)[0]), vx, dimensionsOf(n, len(extra)+1))
|
||||
} else {
|
||||
foldEach(dst, _xor_avx512, other, extra)
|
||||
}
|
||||
vx, max := pointersOf(other, extra)
|
||||
_xor_many_avx512(unsafe.Pointer(&(*dst)[0]), vx, dimensionsOf(max, len(extra)+1))
|
||||
}
|
||||
default:
|
||||
xor(*dst, other, extra)
|
||||
|
||||
Reference in new issue
Block a user