Repository navigation
simd: chained gather — a chain of key reads folded into one pass - #358
Merged
Merged
Conversation
mask_gather_chain_u32[_under](index, [under], hops, out): bit i is set when the key index[i] leads through every hop, each row reached in range, live in the hop's resident plane, passing that hop's equality tests, and each hop's next key naming the following hop's row. The targets' predicates are evaluated at the row each key reaches, so no mask over any hop's table is built (lance-graph's chained-hop option (a), start[fk^k(i)]). The gated form reads index only at rows the gate holds. Scalar by necessity, like mask_gather_u32: each address is a value read by the previous hop. One hop with no tests is mask_gather_u32_under. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Two hops, out-of-range keys at both depths, a negated test at the second hop, a dirty gate tail; references walk the chain row by row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
mask_gather_chain_u32andmask_gather_chain_u32_under, plusChainHopandChainTest. They are re-exported fromndarray::simd.Bit
iis set when the keyindex[i]leads through every hop. At each hop, the row it reaches must be in range, live in that hop's plane, and pass that hop's equality tests (optionally negated). That hop'snextlane then gives the key into the following hop.The targets' predicates are evaluated at the row each key reaches, so no mask over any hop's table is built. This is lance-graph's chained-hop option (a),
start[fk^k(i)]: chained hops fold into one pass with one terminal, and nothing is materialized between hops.indexonly at rows where the gate bit is set. Gate tail bits pastnare ignored.outis fully overwritten.mask_gather_u32: each address is a value the previous hop read.mask_gather_u32_under(pinned by a test).The shape is validated at entry and panics on:
nexton a non-last hop;nexton the last hop;rows.Tests
should_panicshape guards.0xD02and0xD03(two hops, out-of-range keys at both depths, a negated test, a dirty gate). Green on v4 and on v3.git checkout. Each patch anchor was asserted.negatefails the row-loop test, and parity reports0xD02.nextfails the row-loop test.cargo clippy --lib --tests -D warningsandcargo fmt --checkare clean.Next
Consumers, in this order:
Gatherop with a predicate at each depth;out()as one program.🤖 Generated with Claude Code
https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Generated by Claude Code