Skip to main content

Module intrinsics

Module intrinsics 

Source
Expand description

High-performance intrinsic functions for Shape

Intrinsics are Rust-implemented functions that provide performance-critical operations while keeping domain logic in Shape stdlib.

These functions are prefixed with __intrinsic_ and should not be called directly by users - they are wrapped by Shape stdlib functions.

Modules§

array_transforms
Array-transform intrinsics — partial migration to typed marshal layer.
convolution
Convolution intrinsics — full migration to typed marshal layer.
distributions
Statistical distribution intrinsics — full migration to typed marshal layer.
fft
FFT (Fast Fourier Transform) intrinsics — full migration to typed marshal layer.
math
Math intrinsics — partial migration to typed marshal layer.
matrix
Matrix intrinsics — full migration to typed marshal layer.
matrix_kernels
SIMD-accelerated matrix kernels operating on MatrixData.
random
Random number generation intrinsics — full migration to typed marshal layer.
recurrence
Recurrence intrinsics — partial migration to typed marshal layer (cross-crate-dual-consumer pattern; see docs/defections.md 2026-05-07 intrinsics-typed-CC entry’s N1 sub-decision).
rolling
Rolling window intrinsics — partial migration to typed marshal layer.
statistical
Statistical intrinsics — full migration to typed marshal layer.
stochastic
Stochastic process intrinsics — full migration to typed marshal layer.
vector
Vector intrinsics — element-wise SIMD operations on f64 / i64 typed arrays.

Structs§

IntrinsicsRegistry
Global intrinsics registry

Functions§

extract_f64
Extract a f64 from an intrinsic argument. Phase 1.B reads the slot’s 8 bytes as f64 directly — variadic intrinsic callers carry the kind contract per registration.
extract_f64_array
Extract a Vec<f64> from an intrinsic array argument.
extract_str
Extract a string reference from an intrinsic argument. Phase 1.B reads the slot bits as Arc<String>::into_raw-shaped per registered string param; returns the borrowed string.
extract_usize
Extract a usize from an intrinsic argument (window size / period).
f64_vec_to_float_array
Build a KindedSlot typed FloatArray from a Vec<f64>. See f64_vec_to_nb_array — Phase 2c rebuild deferral.
f64_vec_to_nb_array
Build a KindedSlot array from a Vec<f64>. Phase 2c lands the proper HeapValue::TypedArray(TypedArrayData::F64) constructor.
i64_vec_to_nb_int_array
Build a KindedSlot typed IntArray from a Vec<i64>. See above.
option_i64_vec_to_nb
Build a KindedSlot IntArray with validity bitmap from Vec<Option<i64>>. Phase 2c rebuild deferral.
try_extract_i64_slice
Try to read an i64 slice directly from a KindedSlot IntArray. Phase 1.B: deferred — returns None.

Type Aliases§

IntrinsicFn
Function signature for intrinsics.