From 820ae5682d936b5f3d1fbabffc0950a7bbd12bd4 Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Wed, 20 Jan 2010 02:04:25 +0000 Subject: [PATCH] Optimized row version of vector_scale with approx 20% improvement --- cpp/Matrix.cpp | 10 +++++++--- cpp/timeMatrix.cpp | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cpp/Matrix.cpp b/cpp/Matrix.cpp index 441dda61a..7ce0c95dc 100644 --- a/cpp/Matrix.cpp +++ b/cpp/Matrix.cpp @@ -545,9 +545,13 @@ return collect(matrices); // row scaling Matrix vector_scale(const Vector& v, const Matrix& A) { Matrix M(A); - for (int i=0; i