You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4170e58
Browse filesBrowse the repository at this point in the historyBrowse files
simd: three data-indexed mask primitives — gather, scatter-or, keyed group-sum
`mask_gather_u32(src, src_rows, index, out)`: bit i of out = src[index[i]],
an out-of-range address reads FALSE (zero-fallback). The foreign-key
semijoin: a predicate mask over table B gathered onto table A through A's
fk lane, no index vector, no pair relation.
`mask_scatter_or_u32(src, index, out, out_rows)`: for every set bit i of
src, set bit index[i] of out. The one-to-many hop (docs that have a
selected line). Cost ∝ popcount(src).
`masked_group_sum_i32(mask, keys, values, out)`: out[keys[i]] += values[i]
over the mask, ONE pass, all groups; a key past out.len() is not a group.
This is the terminal a categorical GROUP BY … SUM lowers to — and it is
NOT `masked_strided_group_sum`, which sums the byte-groups of one V3
register into one scalar, carries no key, and has zero callers.
All three are deliberately scalar bit-walks: data-indexed permutations and
scatter-adds do not vector-load, the same reasoning `masked_strided_group_sum`
already records. 26 unit tests (tails at 67/130, out-of-range dropped,
garbage-prefilled buffers come back tail-zero), parity check group 13
against naive references with out-of-range addresses mixed in, gather's
range guard disable-verified red (2 tests + parity 0xD00) then green.
Consumer: lance-graph-mask-risc `Gather` / `ScatterOr` / `GroupSum`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
Added `mask_gather_u32`, `mask_scatter_or_u32`, `masked_group_sum_i32` to `simd_masking_ops.rs` + the `simd::` facade.
4
+
All three are deliberately scalar bit-walks — permutations/scatters indexed by `index`/`keys` data, not a fixed stride, so none of this crate's backends can vector-load them (same shape as `masked_strided_group_sum`, which says so in its own doc).
5
+
`masked_strided_group_sum` is NOT a keyed group-by and never was — it sums one record's own byte-groups into a single scalar with no key at all; zero callers of either are affected by this addition.
6
+
Parity: `check_gather_scatter_group` (0xDxx) in `crates/simd-masking-parity`, against naive per-element references, disable-verified red-then-green.
## 2026-09-17 (19) — G8 named: a tree-depth column (`lzcnt(bswap(x)) >> 2`) is the missing primitive for basin-local ranking; popcount is only its tie-break
2
10
3
11
Filed, not built. Full text in `masking-ops-state.md` § OUTLOOK G8 and the
0 commit comments