---
milena/apps/bench/Makefile.am | 18 ++++++++++++++++--
milena/apps/bench/dilation-lena-table.cc | 18 ++++++++++++++----
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/milena/apps/bench/Makefile.am b/milena/apps/bench/Makefile.am
index 18e0a38..b5919ce 100644
--- a/milena/apps/bench/Makefile.am
+++ b/milena/apps/bench/Makefile.am
@@ -52,7 +52,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 \
@@ -63,7 +62,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 \
@@ -75,6 +73,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 \
diff --git a/milena/apps/bench/dilation-lena-table.cc
b/milena/apps/bench/dilation-lena-table.cc
index cff1a2b..ca21758 100644
--- a/milena/apps/bench/dilation-lena-table.cc
+++ b/milena/apps/bench/dilation-lena-table.cc
@@ -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();
--
1.7.2.5
Show replies by date