Skip to content

Commit 10bd518

Browse files
committed
refactor(simd): Phase 4 — extract scalar backend to simd_scalar.rs
Phase 4 of the integration plan in `.claude/knowledge/ simd-dispatch-architecture.md`. simd.rs shrinks from 1956 → 685 LoC by lifting the inline 1271-line `pub(crate) mod scalar { ... }` block (impl_float_type! / impl_int_type! macros + 11 type instantiations + 30+ extra impl blocks for U8x64 / I8x*/I16x* / U16x32 / I32x16 / I64x8 / F32x16 / F64x8 / U32x16 / U64x8) out into its own file `src/simd_scalar.rs`. Declared from `simd.rs` with `#[path = "simd_scalar.rs"] pub(crate) mod scalar;` so the internal module name stays `scalar` — every `pub use scalar::{...}` re-export in `simd.rs` continues to resolve unchanged. Behavior is byte-identical. The file move is mechanical: zero semantic edits, just outdented one level and wrapped with a module-level doc comment explaining its role as the non-x86_64 fallback backend. Why now: the dispatcher should read as a re-export catalog with cfg arms, not 1.6k LoC of macro expansions. Future tweaks to the scalar backend (TD-SIMD-5 in the architecture doc) now live in a file named for what they are.
1 parent a18366a commit 10bd518

2 files changed

Lines changed: 1293 additions & 1270 deletions

File tree

0 commit comments

Comments
 (0)