diff -r 4c2e5e65d510 -r f2fc6115b897 src/nalgebra_support.rs --- a/src/nalgebra_support.rs Tue Dec 31 23:34:47 2024 -0500 +++ b/src/nalgebra_support.rs Tue Dec 31 23:49:09 2024 -0500 @@ -63,8 +63,9 @@ DefaultAllocator : Allocator { } -impl GEMV, Matrix> for Matrix -where SM: Storage, SV1: Storage + Clone, SV2: StorageMut, +impl GEMV> for Matrix +where SM: Storage, SV1: Storage + Clone, + OMatrix : AXPY, N : Dim, M : Dim, K : Dim, E : Scalar + Zero + One + Float, DefaultAllocator : Allocator, DefaultAllocator : Allocator, @@ -73,37 +74,36 @@ #[inline] fn gemv>>( - &self, y : &mut Matrix, α : E, x : I, β : E + &self, y : &mut OMatrix, α : E, x : I, β : E ) { x.eval(|x̃| Matrix::gemm(y, α, self, x̃, β)) } #[inline] - fn apply_mut<'a, I : Instance>>(&self, y : &mut Matrix, x : I) { + fn apply_mut<'a, I : Instance>>(&self, y : &mut OMatrix, x : I) { x.eval(|x̃| self.mul_to(x̃, y)) } } -impl AXPY> for Vector -where SM: StorageMut + Clone, SV1: Storage + Clone, +impl AXPY> for Vector +where SM: StorageMut + Clone, M : Dim, E : Scalar + Zero + One + Float, DefaultAllocator : Allocator { - type Owned = OVector; #[inline] - fn add_mul>>(self, α : E, x : I, β : E) -> Self::Owned { + fn add_mul>>(self, α : E, x : I, β : E) -> OVector { let mut owned = self.into_owned(); x.eval(|x̃| Matrix::axpy(&mut owned, α, x̃, β)); owned } #[inline] - fn axpy>>(&mut self, α : E, x : I, β : E) { + fn axpy>>(&mut self, α : E, x : I, β : E) { x.eval(|x̃| Matrix::axpy(self, α, x̃, β)) } #[inline] - fn copy_from>>(&mut self, y : I) { + fn copy_from>>(&mut self, y : I) { y.eval(|ỹ| Matrix::copy_from(self, ỹ)) } @@ -113,7 +113,7 @@ } #[inline] - fn similar_origin(&self) -> Self::Owned { + fn similar_origin(&self) -> OVector { OVector::zeros_generic(M::from_usize(self.len()), Const) } }