Skip to content

simd: re-export checked i64 arithmetic through the facade - #407

Merged
AdaWorldAPI merged 2 commits into
masterfrom
ccr-45a41fb4-0j3i0l
Oct 30, 2026
Merged

AdaWorldAPI merged 2 commits into
masterfrom
ccr-45a41fb4-0j3i0l

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

checked_binary_i64, checked_i64, range_i64, range_len_i64, I64Op and I64ArithError could only be reached as ndarray::hpc::checked_i64. A consumer must never name hpc, so the DT64 bind store (lance-graph lance-graph-dt64) had no legal facade word for the int64 multiply in XLOG's count or in an ONNX Mul(int64) node.

This PR adds plain pub use re-exports to ndarray::simd: the same functions with the same refusal policy (overflow, division by zero and length mismatch are refused, and nothing is written on refusal).

Tests:

  • A doctest on the re-export imports ndarray::simd::{checked_binary_i64, I64ArithError, I64Op} from outside the crate.
    • Disable run: turning the re-export into a private use fails both doctests with E0603 (private item).
    • An in-crate unit test could not catch this, because a child module can see a private use in its parent. I checked: that disable stayed green with the unit test alone.
  • A unit test checks the multiply, the overflow refusal, and that nothing is written on refusal.
  • clippy -D warnings and fmt are clean.

Generated by Claude Code

checked_binary_i64, checked_i64, range_i64, range_len_i64, I64Op and
I64ArithError were reachable only as ndarray::hpc::checked_i64, so a
consumer (the DT64 bind store binding XLOG's count, ONNX int64 Mul) had
to name hpc. Plain re-exports: same functions, same refusal policy. The
test imports through the facade path, so dropping the re-export fails
to build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
The in-crate test sees a private use; the doctest is a consumer, so it
fails to build if the re-export is not public.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1f69c524-88b9-4e87-91b1-23cc81d4fd16
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 October 30, 2026 16:35
@AdaWorldAPI
AdaWorldAPI merged commit b3d7919 into master Oct 30, 2026
30 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T16:36:41.257682Z 8f67171 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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