last-svn-commit-552-gc061b74 WIP: Misc. changes in apps/bench/.

--- milena/apps/bench/Makefile.am | 3 +-- milena/apps/bench/dilation-lena-table.cc | 11 ++++++++++- milena/apps/bench/dilation-lena.cc | 2 ++ milena/apps/bench/dilation-lena.hh | 4 ---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/milena/apps/bench/Makefile.am b/milena/apps/bench/Makefile.am index e27be3c..18e0a38 100644 --- a/milena/apps/bench/Makefile.am +++ b/milena/apps/bench/Makefile.am @@ -17,8 +17,7 @@ # Find Milena headers. AM_CPPFLAGS = -I$(top_srcdir)/milena -I$(top_builddir)/milena # Produce fast code. -APPS_CXXFLAGS = @APPS_CXXFLAGS@ -AM_CXXFLAGS = $(APPS_CXXFLAGS) +AM_CXXFLAGS = $(APPS_CXXFLAGS_NODEBUG) EXTRA_DIST = lena1024.pgm lena2048.pgm diff --git a/milena/apps/bench/dilation-lena-table.cc b/milena/apps/bench/dilation-lena-table.cc index 3057ce3..cff1a2b 100644 --- a/milena/apps/bench/dilation-lena-table.cc +++ b/milena/apps/bench/dilation-lena-table.cc @@ -23,6 +23,9 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +#include <iostream> +#include <iomanip> + #include "apps/bench/dilation-lena.hh" #include "apps/data.hh" @@ -67,6 +70,7 @@ run(const std::string& filename, unsigned niters) image2d<int_u8> d; util::timer t; std::vector<float> times; + times.reserve(5); DILATION_WITH_BUILTIN_WINDOW(nongen, "nongen", "nongen\t\t"); DILATION_WITH_BUILTIN_WINDOW(nongen_2ptr, "nongen_2ptr", "nongen_2ptr\t"); @@ -106,7 +110,7 @@ run(const std::string& filename, unsigned niters) } int -main () +main (int /* argc */, char* argv[]) { unsigned niters = 10; typedef std::vector<float> times_t; @@ -121,6 +125,8 @@ main () times_t::const_iterator i_1024 = times_1024.begin(); times_t::const_iterator i_2048 = times_2048.begin(); std::cout << + "% Generated by `" << argv[0] << "', do not modify.\n" + "\n" "\\begin{table}[tbp]\n" " \\centering\n" " \\begin{tabular}{lrrr}\n" @@ -130,6 +136,9 @@ main () " \\hline\n" " \\hline\n"; + // Fix the output format for floats. + std::cout << std::fixed << std::setprecision(4); + /* Increment each iterator only once in each output statement to avoid non-determinism due to the successive uses of operator++ on a given iterator. */ diff --git a/milena/apps/bench/dilation-lena.cc b/milena/apps/bench/dilation-lena.cc index 82b4497..0754cab 100644 --- a/milena/apps/bench/dilation-lena.cc +++ b/milena/apps/bench/dilation-lena.cc @@ -23,6 +23,8 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +#include <iostream> + #include "apps/bench/dilation-lena.hh" #include "apps/data.hh" diff --git a/milena/apps/bench/dilation-lena.hh b/milena/apps/bench/dilation-lena.hh index c89eb4e..47e76dd 100644 --- a/milena/apps/bench/dilation-lena.hh +++ b/milena/apps/bench/dilation-lena.hh @@ -29,10 +29,6 @@ /// \file /// \brief Dilation benchmark cases. -#include <cstddef> - -#include <iostream> - #include <mln/core/image/image2d.hh> #include <mln/core/alias/window2d.hh> -- 1.7.2.5
participants (1)
-
Roland Levillain