From 1a633969b31b2a486bdfae80576c53f40293281e Mon Sep 17 00:00:00 2001 From: Ismael Date: Thu, 2 Jun 2016 22:23:39 +0200 Subject: [PATCH] changed BigO logic order --- src/complexity.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/complexity.cc b/src/complexity.cc index e25aa3c4..24f1cf4e 100644 --- a/src/complexity.cc +++ b/src/complexity.cc @@ -242,12 +242,12 @@ std::vector ComputeBigO( LeastSq result_cpu; LeastSq result_real; - if (reports[0].complexity != oLambda) { - result_cpu = MinimalLeastSq(n, cpu_time, reports[0].complexity); - result_real = MinimalLeastSq(n, real_time, result_cpu.complexity); - } else { + if (reports[0].complexity == oLambda) { result_cpu = MinimalLeastSq(n, cpu_time, reports[0].complexity_lambda); result_real = MinimalLeastSq(n, real_time, reports[0].complexity_lambda); + } else { + result_cpu = MinimalLeastSq(n, cpu_time, reports[0].complexity); + result_real = MinimalLeastSq(n, real_time, result_cpu.complexity); } std::string benchmark_name = reports[0].benchmark_name.substr(0, reports[0].benchmark_name.find('/'));