Expand description
Vector intrinsics — element-wise SIMD operations on f64 / i64 typed arrays.
Twelve typed-marshal entry points (__intrinsic_vec_*) are registered via
register_typed_fn_N into the module returned by
create_vector_intrinsics_module. Inputs are zero-copy
Arc<Vec<f64>> (f64) / Arc<Vec<i64>> (i64) per the
per-storage-variant body-type map in docs/defections.md 2026-05-07
zero-copy entry. Outputs project through ConcreteReturn::ArrayF64(Vec<f64>)
/ ConcreteReturn::ArrayI64(Vec<i64>) (output owned-clone — full output-
zero-copy is deferred follow-on per the same entry’s α-ToSlot-dead-at-
marshal-layer subsection).
Q2-marshal-fold-light migration of the vector cluster (intrinsics-typed-CC
cluster, M-A scope per the entry’s three-stage Q2 lifecycle subsection).
shape-vm dispatcher routing in vector_intrinsics.rs:25-39 is part of
shape-vm cleanup workstream’s natural scope; not migrated here.
SIMD via the wide crate’s f64x4. Kernel SIMD helpers
(simd_vec_*_f64, simd_vec_*_i64, i64_slice_to_f64) below are also
used by shape-vm’s executor arithmetic dispatch; kept pub for that
consumer.
Functions§
- create_
vector_ intrinsics_ module - Create the vector intrinsics module with all 12 typed-marshal entry points.
- i64_
slice_ to_ f64 - Coerce an i64 slice to f64 for mixed-type arithmetic.
- simd_
vec_ add_ f64 - Element-wise addition of two f64 slices using SIMD (f64x4).
Returns an
AlignedVec<f64>. Panics if lengths differ (debug only). - simd_
vec_ add_ i64 - Element-wise addition of two i64 slices with checked overflow. Returns Err if any element pair overflows.
- simd_
vec_ div_ f64 - Element-wise division of two f64 slices using SIMD.
- simd_
vec_ div_ i64 - Element-wise division of two i64 slices with checked overflow.
- simd_
vec_ mul_ f64 - Element-wise multiplication of two f64 slices using SIMD.
- simd_
vec_ mul_ i64 - Element-wise multiplication of two i64 slices with checked overflow.
- simd_
vec_ scale_ f64 - Scalar broadcast: multiply each element by a scalar using SIMD.
- simd_
vec_ sub_ f64 - Element-wise subtraction of two f64 slices using SIMD.
- simd_
vec_ sub_ i64 - Element-wise subtraction of two i64 slices with checked overflow.