From b02b292d9f01874729f4eacaf8b09032017fcb8b Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Sat, 10 Sep 2011 22:00:54 +0200 Subject: [PATCH] Fewer temporary variables --- src/bisection-example-new.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bisection-example-new.cc b/src/bisection-example-new.cc index c789cff3..59035dfa 100644 --- a/src/bisection-example-new.cc +++ b/src/bisection-example-new.cc @@ -41,13 +41,13 @@ class SampleFunctional { since A is symmetric. */ - SmallVector tmp2; - A_.mv(descDir, tmp2); - double const rest_A = tmp2 * descDir; + SmallVector tmp; - SmallVector tmp3; - A_.mv(x, tmp3); - double const rest_b = (b_ - tmp3) * descDir; + A_.mv(descDir, tmp); + double const rest_A = tmp * descDir; + + A_.mv(x, tmp); + double const rest_b = (b_ - tmp) * descDir; typedef MyNonlinearity<dimension, Function> MyNonlinearityType; MyNonlinearityType phi; -- GitLab