Commit b368f268 authored by Roland Levillain's avatar Roland Levillain
Browse files

apps/bench: Misc. changes.

	* apps/bench/dilation-lena.hh,
	* apps/bench/dilation-lena.cc,
	* apps/bench/dilation-lena-table.cc:
	Here.
	* apps/bench/Makefile.am (AM_CXXFLAGS):
	Set to $(APPS_CXXFLAGS_NODEBUG)
parent 8adc75d9
2011-01-10 Roland Levillain <roland@lrde.epita.fr>
apps/bench: Misc. changes.
* apps/bench/dilation-lena.hh,
* apps/bench/dilation-lena.cc,
* apps/bench/dilation-lena-table.cc:
Here.
* apps/bench/Makefile.am (AM_CXXFLAGS):
Set to $(APPS_CXXFLAGS_NODEBUG)
2011-01-10 Roland Levillain <roland@lrde.epita.fr>
 
apps/bench: Generate a LaTeX table from some results of dilation-lena.
......@@ -14,7 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
include $(top_srcdir)/milena/apps/apps.mk
include $(top_srcdir)/milena/common.mk
# Find apps/data.hh (generated header).
AM_CPPFLAGS += -I$(top_builddir)/milena
# Produce fast code with no debugging symbols.
AM_CXXFLAGS = $(APPS_CXXFLAGS_NODEBUG)
EXTRA_DIST = lena1024.pgm lena2048.pgm
......
......@@ -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. */
......
......@@ -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"
......
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment