From 7f6234517cb521e699b36cdc41dee40840a5cb3e Mon Sep 17 00:00:00 2001 From: conrad Date: Fri, 30 Apr 2021 23:18:20 +1000 Subject: [PATCH] minor optimisation --- include/armadillo_bits/newarp_SymEigsSolver_meat.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/armadillo_bits/newarp_SymEigsSolver_meat.hpp b/include/armadillo_bits/newarp_SymEigsSolver_meat.hpp index 6b35e7af..649a5e2e 100644 --- a/include/armadillo_bits/newarp_SymEigsSolver_meat.hpp +++ b/include/armadillo_bits/newarp_SymEigsSolver_meat.hpp @@ -166,7 +166,11 @@ SymEigsSolver::restart(uword k) nnz = ncv - k + i + 1; Mat V(fac_V.memptr(), dim_n, nnz, false); Col q(Q.colptr(i), nnz, false); - Vs.col(i) = V * q; + // OLD CODE: + // Vs.col(i) = V * q; + // NEW CODE: + Col v(Vs.colptr(i), dim_n, false, true); + v = V * q; } Vs.col(k) = fac_V * Q.col(k); fac_V.head_cols(k + 1) = Vs;