diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-08-04 23:12:48 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-08-04 23:12:48 +0000 |
commit | a7a05382d1c51964bf3ea0536c6ddd9cc9888b72 (patch) | |
tree | 413a9ecf342bf59ff685495eff70f999ee7803ac /bench/btl/generic_bench/bench.hh | |
parent | c2f8ecf46683adcab0db05199ee2ebe15e6ada4a (diff) |
Add a LU decomposition action in BTL and various cleaning in BTL. For instance
all per plot settings have been moved to a single file, go_mean now takes an
optional second argument "tiny" to generate plots for tiny matrices, and
output of comparison information wrt to previous benchs (if any).
Diffstat (limited to 'bench/btl/generic_bench/bench.hh')
-rw-r--r-- | bench/btl/generic_bench/bench.hh | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/bench/btl/generic_bench/bench.hh b/bench/btl/generic_bench/bench.hh index bb3ca6667..005c36395 100644 --- a/bench/btl/generic_bench/bench.hh +++ b/bench/btl/generic_bench/bench.hh @@ -53,13 +53,15 @@ BTL_DONT_INLINE void bench( int size_min, int size_max, int nb_point ) std::vector<int> tab_sizes(nb_point); // matrices and vector size calculations - size_lin_log(nb_point,size_min,size_max,tab_sizes); - // loop on matrix size + std::vector<int> oldSizes; + std::vector<double> oldFlops; + bool hasOldResults = read_xy_file(filename, oldSizes, oldFlops, true); + int oldi = oldSizes.size() - 1; + // loop on matrix size Perf_Analyzer<Action> perf_action; - for (int i=nb_point-1;i>=0;i--) { //INFOS("size=" <<tab_sizes[i]<<" ("<<nb_point-i<<"/"<<nb_point<<")"); @@ -74,14 +76,28 @@ BTL_DONT_INLINE void bench( int size_min, int size_max, int nb_point ) #endif tab_mflops[i] = perf_action.eval_mflops(tab_sizes[i]); - std::cout << tab_mflops[i] << " MFlops (" << nb_point-i << "/" << nb_point << ")" << std::endl; + std::cout << tab_mflops[i]; + + if (hasOldResults) + { + while (oldi>=0 && oldSizes[oldi]>tab_sizes[i]) + --oldi; + if (oldi>=0 && oldSizes[oldi]==tab_sizes[i]) + { + if (oldFlops[oldi]<tab_mflops[i]) + std::cout << "\t > "; + else + std::cout << "\t < "; + std::cout << oldFlops[oldi]; + } + --oldi; + } + std::cout << " MFlops (" << nb_point-i << "/" << nb_point << ")" << std::endl; } if (!BtlConfig::Instance.overwriteResults) { - std::vector<int> oldSizes; - std::vector<double> oldFlops; - if (read_xy_file(filename, oldSizes, oldFlops, true)) + if (hasOldResults) { // merge the two data std::vector<int> newSizes; |