AUDIO
Source snapshot · 11 November 2026

API reference / ravet_native_dsp::PreparedVectorOps64

Struct PreparedVectorOps64 

pub struct PreparedVectorOps64 { /* 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 PreparedVectorOps64

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: f64, output: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn clear(self, output: &mut [f64], n: usize) -> Result<(), VectorError>

pub fn copy( self, input: &[f64], output: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn add( self, a: &[f64], b: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn subtract( self, a: &[f64], b: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn multiply( self, a: &[f64], b: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn divide( self, a: &[f64], b: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn minimum( self, a: &[f64], b: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn maximum_values( self, a: &[f64], b: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn gain( self, input: &[f64], gain: f64, out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn offset( self, input: &[f64], offset: f64, out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn absolute( self, input: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn negate( self, input: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn sqrt( self, input: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn gain_in_place( self, output: &mut [f64], gain: f64, n: usize, ) -> Result<(), VectorError>

pub fn add_in_place( self, input: &[f64], output: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn add_product( self, a: &[f64], b: &[f64], c: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

Separate rounded products then sums; no fused multiply-add.

pub fn clip( self, input: &[f64], low: f64, high: f64, out: &mut [f64], 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: &[f64], n: usize) -> Result<f64, 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: &[f64], b: &[f64], n: usize) -> Result<f64, VectorError>

pub fn minimum_value( self, input: &[f64], n: usize, ) -> Result<Option<f64>, VectorError>

Sequential right-preference extrema, unlike the pairwise sum tree.

pub fn maximum_value( self, input: &[f64], n: usize, ) -> Result<Option<f64>, VectorError>

pub fn convert_i32( self, input: &[i32], scale: f64, out: &mut [f64], n: usize, ) -> Result<(), VectorError>

pub fn gain_planar( self, inputs: &[&[f64]], gains: &[f64], outputs: &mut [&mut [f64]], n: usize, ) -> Result<(), VectorError>

Whole-bank 1..64 channel admission before any channel edit.

pub fn gain_planar_in_place( self, outputs: &mut [&mut [f64]], gains: &[f64], n: usize, ) -> Result<(), VectorError>

pub fn interleave( self, a: &[f64], b: &[f64], out: &mut [f64], n: usize, ) -> Result<(), VectorError>

n per-channel frames, 2*n destination samples; checked before edits.

pub fn deinterleave( self, input: &[f64], a: &mut [f64], b: &mut [f64], n: usize, ) -> Result<(), VectorError>

Trait Implementations§

§

impl Clone for PreparedVectorOps64

§

fn clone(&self) -> PreparedVectorOps64

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Copy for PreparedVectorOps64

§

impl Debug for PreparedVectorOps64

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.