pub trait MulAcc<A = Self, B = A> {
// Required method
fn mul_acc(&mut self, a: &A, b: &B);
}
Expand description
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.