From e491dc381385b00db3b3abd356524f4d3658da77 Mon Sep 17 00:00:00 2001 From: TimQu Date: Thu, 1 Mar 2018 17:54:00 +0100 Subject: [PATCH] fixed usage of multiplyrow --- src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp | 8 +++++--- src/storm/solver/NativeLinearEquationSolver.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index 184c1e027..845e7495e 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -667,9 +667,11 @@ namespace storm { } void multiplyRow(uint64_t const& row, storm::storage::SparseMatrix const& A, storm::solver::Multiplier const& multiplier, ValueType const& bi, ValueType& xi, ValueType& yi) { - xi = bi; - yi = storm::utility::zero(); - multiplier.multiplyRow2(row, x, xi, y, yi); + ValueType xRes = bi; + ValueType yRes = storm::utility::zero(); + multiplier.multiplyRow2(row, x, xRes, y, yRes); + xi = std::move(xRes); + yi = std::move(yRes); } template diff --git a/src/storm/solver/NativeLinearEquationSolver.cpp b/src/storm/solver/NativeLinearEquationSolver.cpp index 51b8fa3c9..48a2819c7 100644 --- a/src/storm/solver/NativeLinearEquationSolver.cpp +++ b/src/storm/solver/NativeLinearEquationSolver.cpp @@ -591,9 +591,11 @@ namespace storm { } void multiplyRow(uint64_t const& row, storm::storage::SparseMatrix const& A, storm::solver::Multiplier const& multiplier, ValueType const& bi, ValueType& xi, ValueType& yi) { - xi = bi; - yi = storm::utility::zero(); - multiplier.multiplyRow2(row, x, xi, y, yi); + ValueType xRes = bi; + ValueType yRes = storm::utility::zero(); + multiplier.multiplyRow2(row, x, xRes, y, yRes); + xi = std::move(xRes); + yi = std::move(yRes); } void performIterationStep(storm::storage::SparseMatrix const& A, storm::solver::Multiplier const& multiplier, std::vector const& b) {