Commit 5095853
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
0 commit comments