Trait sprs::MulAcc[][src]

pub trait MulAcc {
    fn mul_acc(&mut self, a: &Self, b: &Self);
}

Trait for types that have a multiply-accumulate operation, as required in dot products and matrix products.

This trait is automatically implemented for numeric types that are Copy, however the implementation is open for more complex types, to allow them to provide the most performant implementation. For instance, we could have a default implementation for numeric types that are Clone, but it would make possibly unnecessary copies.

Required methods

fn mul_acc(&mut self, a: &Self, b: &Self)[src]

Multiply and accumulate in this variable, formally *self += a * b.

Loading content...

Implementors

impl<N> MulAcc for N where
    N: Copy + MulAdd<Output = N>, 
[src]

Loading content...