Struct Prepared Vector Ops32
pub struct PreparedVectorOps32 { /* private fields */ }Expand description
Fixed backend and maximum per-channel sample count. All lengths and control values are checked before any output edit; no heap is used. Elementwise native chunks have the fixed register width; remaining samples use scalar operations. Suffixes are untouched. There is no automatic denormal scope or universal cross-backend bitwise promise.
Implementations§
§impl PreparedVectorOps32
impl PreparedVectorOps32
pub fn new(backend: VectorBackend, maximum: usize) -> Result<Self, VectorError>
pub fn backend(self) -> VectorBackend
pub fn maximum(self) -> usize
pub fn fill( self, value: f32, output: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn clear(self, output: &mut [f32], n: usize) -> Result<(), VectorError>
pub fn copy( self, input: &[f32], output: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn add( self, a: &[f32], b: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn subtract( self, a: &[f32], b: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn multiply( self, a: &[f32], b: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn divide( self, a: &[f32], b: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn minimum( self, a: &[f32], b: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn maximum_values( self, a: &[f32], b: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn gain( self, input: &[f32], gain: f32, out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn offset( self, input: &[f32], offset: f32, out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn absolute( self, input: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn negate( self, input: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn sqrt( self, input: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn gain_in_place( self, output: &mut [f32], gain: f32, n: usize, ) -> Result<(), VectorError>
pub fn add_in_place( self, input: &[f32], output: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn add_product(
self,
a: &[f32],
b: &[f32],
c: &[f32],
out: &mut [f32],
n: usize,
) -> Result<(), VectorError>
pub fn add_product( self, a: &[f32], b: &[f32], c: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
Separate rounded products then sums; no fused multiply-add.
pub fn clip(
self,
input: &[f32],
low: f32,
high: f32,
out: &mut [f32],
n: usize,
) -> Result<(), VectorError>
pub fn clip( self, input: &[f32], low: f32, high: f32, out: &mut [f32], n: usize, ) -> Result<(), VectorError>
NaNs keep their input bits; finite endpoints and low<=high required.
The low > high range check is a floating comparison and observes
the live input-flush policy: under an active FlushBoth scope,
subnormal endpoints compare as signed zeros, so e.g. low = +MIN subnormal, high = -MIN subnormal is admitted even though its bit
order is inverted. Output selection then follows the same flushed
comparisons while copying the original endpoint/input bits.
pub fn sum(self, input: &[f32], n: usize) -> Result<f32, VectorError>
pub fn sum(self, input: &[f32], n: usize) -> Result<f32, VectorError>
Pairwise packed sums, then left-fold chunk totals and scalar tail. Empty input returns +0; there is no widening/compensation.
pub fn dot(self, a: &[f32], b: &[f32], n: usize) -> Result<f32, VectorError>
pub fn minimum_value(
self,
input: &[f32],
n: usize,
) -> Result<Option<f32>, VectorError>
pub fn minimum_value( self, input: &[f32], n: usize, ) -> Result<Option<f32>, VectorError>
Sequential right-preference extrema, unlike the pairwise sum tree.
pub fn maximum_value( self, input: &[f32], n: usize, ) -> Result<Option<f32>, VectorError>
pub fn convert_i32( self, input: &[i32], scale: f32, out: &mut [f32], n: usize, ) -> Result<(), VectorError>
pub fn gain_planar(
self,
inputs: &[&[f32]],
gains: &[f32],
outputs: &mut [&mut [f32]],
n: usize,
) -> Result<(), VectorError>
pub fn gain_planar( self, inputs: &[&[f32]], gains: &[f32], outputs: &mut [&mut [f32]], n: usize, ) -> Result<(), VectorError>
Whole-bank 1..64 channel admission before any channel edit.
pub fn gain_planar_in_place( self, outputs: &mut [&mut [f32]], gains: &[f32], n: usize, ) -> Result<(), VectorError>
pub fn interleave(
self,
a: &[f32],
b: &[f32],
out: &mut [f32],
n: usize,
) -> Result<(), VectorError>
pub fn interleave( self, a: &[f32], b: &[f32], out: &mut [f32], n: usize, ) -> Result<(), VectorError>
n per-channel frames, 2*n destination samples; checked before edits.
pub fn deinterleave( self, input: &[f32], a: &mut [f32], b: &mut [f32], n: usize, ) -> Result<(), VectorError>
Trait Implementations§
§impl Clone for PreparedVectorOps32
impl Clone for PreparedVectorOps32
§fn clone(&self) -> PreparedVectorOps32
fn clone(&self) -> PreparedVectorOps32
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more