Commit 27fd9c88 authored by Roland Levillain's avatar Roland Levillain
Browse files

apps/bench: Have dilation-lena-table behave more like dilation-lena.

	* apps/bench/dilation-lena-table.cc: Here.
	* apps/bench/Makefile.am (MOSTLYCLEANFILES): Update.
parent b368f268
2011-01-10 Roland Levillain <roland@lrde.epita.fr>
apps/bench: Have dilation-lena-table behave more like dilation-lena.
* apps/bench/dilation-lena-table.cc: Here.
* apps/bench/Makefile.am (MOSTLYCLEANFILES): Update.
2011-01-10 Roland Levillain <roland@lrde.epita.fr>
 
apps/bench: Misc. changes.
......@@ -49,7 +49,6 @@ MOSTLYCLEANFILES = \
dilation-lena-out-512-faster_noaccu.pgm \
dilation-lena-out-512-fast_static.pgm \
dilation-lena-out-512-faster_static.pgm \
\
dilation-lena-out-1024-nongen.pgm \
dilation-lena-out-1024-nongen_2ptr.pgm \
dilation-lena-out-1024-nongen_1ptr.pgm \
......@@ -60,7 +59,6 @@ MOSTLYCLEANFILES = \
dilation-lena-out-1024-faster_noaccu.pgm \
dilation-lena-out-1024-fast_static.pgm \
dilation-lena-out-1024-faster_static.pgm \
\
dilation-lena-out-2048-nongen.pgm \
dilation-lena-out-2048-nongen_2ptr.pgm \
dilation-lena-out-2048-nongen_1ptr.pgm \
......@@ -72,6 +70,22 @@ MOSTLYCLEANFILES = \
dilation-lena-out-2048-fast_static.pgm \
dilation-lena-out-2048-faster_static.pgm \
\
dilation-lena-table-out-512-nongen.pgm \
dilation-lena-table-out-512-nongen_2ptr.pgm \
dilation-lena-table-out-512-gen.pgm \
dilation-lena-table-out-512-fast.pgm \
dilation-lena-table-out-512-fast_static.pgm \
dilation-lena-table-out-1024-nongen.pgm \
dilation-lena-table-out-1024-nongen_2ptr.pgm \
dilation-lena-table-out-1024-gen.pgm \
dilation-lena-table-out-1024-fast.pgm \
dilation-lena-table-out-1024-fast_static.pgm \
dilation-lena-table-out-2048-nongen.pgm \
dilation-lena-table-out-2048-nongen_2ptr.pgm \
dilation-lena-table-out-2048-gen.pgm \
dilation-lena-table-out-2048-fast.pgm \
dilation-lena-table-out-2048-fast_static.pgm \
\
gradient-lena-out.pgm \
gradient-spe-lena-out-0.pgm \
gradient-spe-lena-out-1.pgm \
......
......@@ -40,6 +40,8 @@
for (unsigned i = 0; i < niters; ++i) \
d = Namespace::dilation(d); \
t.stop(); \
std::cerr << Headline << t.read() << " s" << std::endl; \
io::pgm::save(d, prefix + '-' + length + '-' + Suffix + ".pgm"); \
times.push_back(t.read()); \
} \
while (0)
......@@ -52,13 +54,15 @@
for (unsigned i = 0; i < niters; ++i) \
d = Namespace::dilation(d, Win); \
t.stop(); \
std::cerr << Headline << t.read() << " s" << std::endl; \
io::pgm::save(d, prefix + '-' + length + '-' + Suffix + ".pgm"); \
times.push_back(t.read()); \
} \
while (0)
std::vector<float>
run(const std::string& filename, unsigned niters)
run(const std::string& filename, const std::string& length, unsigned niters)
{
using namespace mln;
using value::int_u8;
......@@ -69,6 +73,10 @@ run(const std::string& filename, unsigned niters)
image2d<int_u8> d;
util::timer t;
std::string prefix = "dilation-lena-table-out";
std::cerr << "== " << filename << std::endl;
std::vector<float> times;
times.reserve(5);
......@@ -106,6 +114,8 @@ run(const std::string& filename, unsigned niters)
DILATION(faster_static, static_win_c4p, "faster_static", "faster_static\t");
#endif
std::cerr << std::endl;
return times;
}
......@@ -116,9 +126,9 @@ main (int /* argc */, char* argv[])
typedef std::vector<float> times_t;
// Compute times.
times_t times_512 = run(MLN_IMG_DIR "/lena.pgm", niters);
times_t times_1024 = run(MLN_APPS_DIR "/bench/lena1024.pgm", niters);
times_t times_2048 = run(MLN_APPS_DIR "/bench/lena2048.pgm", niters);
times_t times_512 = run(MLN_IMG_DIR "/lena.pgm", "512", niters);
times_t times_1024 = run(MLN_APPS_DIR "/bench/lena1024.pgm", "1024", niters);
times_t times_2048 = run(MLN_APPS_DIR "/bench/lena2048.pgm", "2048", niters);
// Display times.
times_t::const_iterator i_512 = times_512.begin();
......
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