Skip to content

simd_int_ops: mask_andnot / mask_andnot_assign (D-LGJ-W8 PR-N) - #280

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/lance-graph-java-panama-valhalla-sus9w8
Aug 18, 2026
Merged

simd_int_ops: mask_andnot / mask_andnot_assign (D-LGJ-W8 PR-N)#280
AdaWorldAPI merged 1 commit into
masterfrom
claude/lance-graph-java-panama-valhalla-sus9w8

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

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.md v3, merged there as #20). Adds the missing mask-algebra primitive the wave's Mask.minus needs:

  • mask_andnot(a, b, dst) / mask_andnot_assign(a, b)dst = a & !b word-wise, in the exact mask_and/mask_or family shape (U64x8-chunked polyfill loop + scalar tail, length-mismatch panics).
  • Re-exported through ndarray::simd (src/simd.rs) — the only sanctioned consumer path; without this the primitive would be unreachable to lgj-abi.
  • Blackboard entry records the consumer wave and the explicit W1a deviation: the pair follows the free-fn family shape rather than the struct-method litmus (council-surfaced S2-7; a lone struct-method beside four free-fn siblings would fragment the polyfill surface; all other W1a criteria — parity vs scalar reference, tail-bit semantics documented, backends via the polyfill dispatch — hold in full).

Tail semantics (documented on both fns)

!b sets b's tail bits, but a & !b ⊆ a word-wise — dst's tail is zero whenever a's tail is zero, the same pre-conforming-inputs contract mask_or documents. A caller holding a possibly-non-conforming a clears the tail itself (the lgj-abi kernel will, against its known n_rows).

Gates (run centrally)

  • cargo test --lib simd_int_ops 51/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).
  • Disable-run, red-then-green: the vectorized op flipped to & — parity + algebra went red exactly (proving the vector path is covered, not just the scalar tail); restored; 51/51.
  • cargo clippy --lib -- -D warnings clean; cargo fmt --check clean.
  • Backend Not traced (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

…-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
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 89704c77-6969-45e2-9cfd-538efe91ddc9


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review August 18, 2026 16:02
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@cursor

cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@AdaWorldAPI
AdaWorldAPI merged commit 3f3504f into master Aug 18, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants