Skip to content

Commit 5095853

Browse files
committed
feat(hpc/soa): SoaVec + soa_struct! + aos_to_soa + soa_to_aos (W3+W5+W6)
New module src/hpc/soa.rs implementing the SoA/AoS layout helpers per .claude/knowledge/w3-w6-soa-aos-design.md v2 (commit 10151d7). W3: SoaVec<T,N> generic container ([Vec<T>; N] inside) with runtime field(i) + compile-time field_n::<I>(), chunks(k), all_fields(). soa_struct! macro generates named-field structs with Vec<T> per field and inherent new/push/len/clear/Default. W5+W6: aos_to_soa<T,N,F> scalar deinterleave via closure; soa_to_aos<T,N,F> scalar interleave inverse. Co-located with SoaVec per plan-review P0-1 (NOT in simd_ops.rs — that module is SIMD-only). Scalar implementations throughout. No #[target_feature], no simd_{type}.rs imports, no cfg(target_feature). Forward-compatible with future bench-justified SIMD swap via grow-internal-arms. Out of scope: distance metrics (see .claude/knowledge/cognitive-distance-typing.md).
1 parent 54b23a0 commit 5095853

2 files changed

Lines changed: 854 additions & 0 deletions

File tree

src/hpc/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ pub mod plane;
4343
#[allow(missing_docs)]
4444
pub mod seal;
4545
#[allow(missing_docs)]
46+
pub mod soa;
47+
#[allow(missing_docs)]
4648
pub mod node;
4749
#[allow(missing_docs)]
4850
pub mod cascade;

0 commit comments

Comments
 (0)