Skip to content

Commit 8483ae3

Browse files
committed
refactor(pr-x1): move SIMD primitives to simd_soa.rs
Per the layering rule: SIMD substrate primitives live at the crate root in `simd_{type}.rs` files, dispatched through `simd.rs > crate::simd`. `src/hpc/column.rs` and `src/hpc/array_chunks.rs` violated that — moved to `src/simd_soa.rs`. src/hpc/column.rs → src/simd_soa.rs (MultiLaneColumn) src/hpc/array_chunks.rs → src/simd_soa.rs (array_chunks + array_chunks_checked) `src/simd.rs` now does `pub use crate::simd_soa::{…}` — the W1a contract path is `use ndarray::simd::*`, consumers never reach into `simd_soa` directly. `src/lib.rs` adds `pub mod simd_soa;` alongside `simd_avx512`, `simd_neon`, `simd_amx`, etc. — same `#[cfg(feature = "std")]` gating as siblings. `src/hpc/mod.rs` drops the two `pub mod` declarations; the doc-comment now records why these are NOT in `hpc::*`. All doctests updated to the canonical `use ndarray::simd::*;` path.
1 parent 5474d1b commit 8483ae3

3 files changed

Lines changed: 156 additions & 194 deletions

File tree

src/hpc/array_chunks.rs

Lines changed: 0 additions & 154 deletions
This file was deleted.

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,14 @@ pub mod simd_neon;
270270
#[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)]
271271
pub mod simd_wasm;
272272

273+
// PR-X1 — SoA-shaped SIMD substrate primitives (`MultiLaneColumn`,
274+
// `array_chunks`). Layout-only; the SIMD register load happens in the
275+
// consumer's loop using `crate::simd::F32x16::from_array` etc. Re-exported
276+
// through `crate::simd::*` per the W1a consumer contract.
277+
#[cfg(feature = "std")]
278+
#[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)]
279+
pub mod simd_soa;
280+
273281
/// Slice-level integer SIMD ops (i8/i16) — `add_i8`, `dot_i8`, `min_i8`, …
274282
#[cfg(feature = "std")]
275283
#[allow(missing_docs)]

0 commit comments

Comments
 (0)