Skip to content

lazymatrix::MatVecScaledInto ​

LazyMatrix for Rust · 0.8.1

Source

rust
pub trait MatVecScaledInto<X, Y, F>: MatrixShape + MatrixErrorType

Fused product out = alpha * A * x + beta * out.

Exact zero alpha skips the product, including any storage reads. Exact zero beta overwrites without reading prior output values. Dimensions are checked even when a coefficient is zero. On an operational error, out may be partial.

Panics ​

Panics unless x has length ncols and out has length nrows.

Methods ​

matvec_scaled_into ​

rust
fn matvec_scaled_into(
    &self,
    alpha: F,
    x: &X,
    beta: F,
    out: &mut Y
) -> Result<(), <Self as MatrixErrorType>::Error>

Source

try_matvec_scaled_normalized_into ​

rust
fn try_matvec_scaled_normalized_into(
    &self,
    _alpha: F,
    _x: &X,
    _beta: F,
    _centers: Option<&[F]>,
    _scales: Option<&[F]>,
    _out: &mut Y
) -> Option<Result<(), <Self as MatrixErrorType>::Error>> where F: lazymatrix::Scalar, X: lazymatrix::VectorView<F>, Y: lazymatrix::VectorViewMut<F>

Source

Try a specialized fused normalized product before algebraic correction.

None leaves output untouched and requests the caller's generic path. Some obeys the fused product's dimension, zero-coefficient, and error contracts. Dense backends use this hook to center before accumulation.

Implementation of MatVecScaledInto ​

Source

rust
impl<A, F, X, Y> MatVecScaledInto<X, Y, F> for ZarrMatrix<A, F> where A: ZarrArray<F>, F: Scalar, X: VectorView<F>, Y: VectorViewMut<F>

Implementation of MatVecScaledInto ​

Source

rust
impl<M, F, X, Y> MatVecScaledInto<X, Y, F> for WithIntercept<M, F> where F: Scalar, X: VectorOwned<F>, Y: VectorViewMut<F>, M: MatVecScaledInto<<X as VectorOwned>::Owned, Y, F>

Implementation of MatVecScaledInto ​

Source

rust
impl<M, X, Y, F, T> MatVecScaledInto<X, Y, F> for EagerMatrix<M, T> where M: MatVecScaledInto<X, Y, F>

Implementation of MatVecScaledInto ​

Source

rust
impl<M, X, Y, F> MatVecScaledInto<X, Y, F> for LazyMatrix<M, F> where F: Scalar, X: VectorOwned<F>, Y: VectorViewMut<F>, M: MatVecScaledInto<X, Y, F> + MatVecScaledInto<<X as VectorOwned>::Owned, Y, F>

Implementation of MatVecScaledInto ​

Source

rust
impl<M, X, Y, F> MatVecScaledInto<X, Y, F> for Submatrix<'_, M, F> where M: SubmatrixKernel<F>, F: Scalar, X: VectorView<F>, Y: VectorViewMut<F>

Implementation of MatVecScaledInto ​

Source

rust
impl<M: MatVecScaledInto<X, Y, F>, X, Y, F> MatVecScaledInto<X, Y, F> for SprsCsc<M>

Implementation of MatVecScaledInto ​

Source

rust
impl<M: MatVecScaledInto<X, Y, F>, X, Y, F> MatVecScaledInto<X, Y, F> for SprsCsr<M>

Released under the MIT and Apache 2.0 licenses.