simd_int_ops: mask_andnot / mask_andnot_assign (D-LGJ-W8 PR-N) - #280
Conversation
…-W8 PR-N) dst = a & !b word-wise, following the mask_and/mask_or family shape exactly (U64x8-chunked polyfill loop + scalar tail, length-mismatch panics, #[inline]). Re-exported through ndarray::simd (the sanctioned consumer path) alongside the existing mask ops. Tail semantics documented on both fns: !b sets b's tail bits, but a & !b is word-wise a subset of a, so dst's tail is zero whenever a's tail is zero — the same pre-conforming-inputs contract mask_or carries. A caller holding a possibly-non-conforming a clears the tail itself (the lance-graph-java kernel does, against its known row count). Tests (5): parity vs inline scalar reference across 13 lengths straddling the 8-word group boundary (incl. the 2-word/70-row shape); algebra identities ((a&!b)|(a&b)==a, (a&!b)&b==0, with a non-vacuity check); the two-arm conforming-tail falsifier; should_panic length-mismatch arms for both fns. Disable-run performed centrally: the vectorized op flipped to & — parity + algebra went red, restored, 51/51 green; clippy -D warnings + fmt clean. Blackboard entry records the consumer wave (lance-graph-java D-LGJ-W8, lgj_mask_andnot behind Mask.minus) and the explicit W1a deviation (free-fn family shape over the struct-method litmus; council-surfaced, rationale in the entry). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_b5344cbb-7c01-47a9-aa3b-9e998bd57f90) |
What
The first implementation PR of lance-graph-java's council-ratified correction wave D-LGJ-W8 (spec: lance-graph-java
.claude/plans/mask-native-navigation-correction-v1.mdv3, merged there as #20). Adds the missing mask-algebra primitive the wave'sMask.minusneeds:mask_andnot(a, b, dst)/mask_andnot_assign(a, b)—dst = a & !bword-wise, in the exactmask_and/mask_orfamily shape (U64x8-chunked polyfill loop + scalar tail, length-mismatch panics).ndarray::simd(src/simd.rs) — the only sanctioned consumer path; without this the primitive would be unreachable to lgj-abi.Tail semantics (documented on both fns)
!bsets b's tail bits, buta & !b ⊆ aword-wise — dst's tail is zero whenever a's tail is zero, the same pre-conforming-inputs contractmask_ordocuments. A caller holding a possibly-non-conformingaclears the tail itself (the lgj-abi kernel will, against its known n_rows).Gates (run centrally)
cargo test --lib simd_int_ops51/51 (46 existing + 5 new: parity across 13 lengths incl. the 2-word/70-row shape, algebra identities with a non-vacuity check, the two-arm conforming-tail falsifier, 2 should_panic arms).&— parity + algebra went red exactly (proving the vector path is covered, not just the scalar tail); restored; 51/51.cargo clippy --lib -- -D warningsclean;cargo fmt --checkclean.Nottraced (not assumed) across all three polyfill arms (AVX-512 / AVX2 / scalar).Merges FIRST per the wave's PR sequence; lance-graph-java PR-W8a consumes
ndarray::simd::{mask_andnot, mask_andnot_assign}next.🤖 Generated with Claude Code
https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs
Generated by Claude Code