Commit Graph
10 Commits
Author SHA1 Message Date
dualfroz 9053576254 Describe this repository 2026-10-22 21:04:28 +02:00
dualfroz 5f576f8089 Fix the var declaration in the README example
Fixes #30
2026-10-02 16:28:21 +02:00
upstream 4f79ed4130 Upstream kelindar/bitmap state of the touched files before 2f8a362c75 2026-10-02 16:28:21 +02:00
dualfroz d648d30d86 Use the accelerated Count on AVX-512 CPUs
The AVX-512 level fell through to the generic loop. _count only needs
POPCNT, which every AVX-512 CPU has.

Fixes #46
2026-10-02 16:28:14 +02:00
dualfrozandRoman 47698fd8b9 Fix Or/Xor dropping bits when combining bitmaps of different lengths (#51)
* fix: union/xor of different-sized bitmaps drops bits in variadic path

Or and Xor with extra bitmaps used _or_many/_xor_many, which apply a single
word count to every input. The count came from pointersOf, whose length is
the maximum over the extra slice only and ignores other, so a longer other
lost its tail words. More generally a uniform count cannot combine operands
of different lengths: a longer source is truncated and a shorter one is read
past its end.

Fold each source in with the single-operand SIMD primitive over its own
length, matching the scalar reference in simd_generic.go. Fixes the amd64
accelerated and AVX-512 branches and the arm64 branch.

* Keep the _many primitives for equal-sized operands, fold only ragged ones

* test: cover longer ragged bitmap extras

---------

Co-authored-by: Roman <roman.atachiants@gmail.com>
2026-09-23 15:30:32 +04:00
upstream 58b05bdfdd Upstream kelindar/bitmap state of the touched files before 7c356f442d 2026-09-23 13:30:32 +02:00
dualfroz 666c48ccf8 Keep the _many primitives for equal-sized operands, fold only ragged ones 2026-09-23 06:12:58 +02:00
upstream 4b1c980512 Upstream kelindar/bitmap state of the touched files before 65a39020a6 2026-09-23 06:12:58 +02:00
dualfroz 4c67b4458d fix: union/xor of different-sized bitmaps drops bits in variadic path
Or and Xor with extra bitmaps used _or_many/_xor_many, which apply a single
word count to every input. The count came from pointersOf, whose length is
the maximum over the extra slice only and ignores other, so a longer other
lost its tail words. More generally a uniform count cannot combine operands
of different lengths: a longer source is truncated and a shorter one is read
past its end.

Fold each source in with the single-operand SIMD primitive over its own
length, matching the scalar reference in simd_generic.go. Fixes the amd64
accelerated and AVX-512 branches and the arm64 branch.
2026-09-06 00:42:23 +02:00
upstream 831b48a3dd Upstream kelindar/bitmap state of the touched files before aa74fd8e7b 2026-09-04 09:13:33 +02:00