From 8175b8a06c6ef568501bc155e415f411ce7af87e Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Thu, 10 Jul 2014 22:01:30 +0200 Subject: [PATCH] Do not save output images. --- rotation.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rotation.cpp b/rotation.cpp index f954899..d45ad81 100644 --- a/rotation.cpp +++ b/rotation.cpp @@ -1027,12 +1027,14 @@ int main(int argc, char* argv[]) } } + double const step = 15; // No tile Image img(argv[1]); float average = 0.0; int i = 0; - for (double rotation = 0; rotation < 360; rotation += 45) + cout << "Simple image" << endl; + for (double rotation = 0; rotation < 360; rotation += step) { auto const before = chrono::high_resolution_clock::now(); Image* const rotated = rotate(img, rotation); @@ -1040,9 +1042,9 @@ int main(int argc, char* argv[]) auto const duration_ms = std::chrono::duration_cast(after - before); average += duration_ms.count(); - cout << "rotate(" << rotation << "): " << duration_ms.count() << " ms" << endl; + //cout << "rotate(" << rotation << "): " << duration_ms.count() << " ms" << endl; - rotated->save(get_save_path("rotated", rotation)); + //rotated->save(get_save_path("rotated", rotation)); delete rotated; ++i; } @@ -1053,7 +1055,8 @@ int main(int argc, char* argv[]) TiledImage<16, 16> tiled_img(argv[1]); average = 0.0; i = 0; - for (double rotation = 0; rotation < 360; rotation += 45) + cout << "Tiled image" << endl; + for (double rotation = 0; rotation < 360; rotation += step) { auto const before = chrono::high_resolution_clock::now(); auto const rotated = rotate(tiled_img, rotation); @@ -1061,9 +1064,9 @@ int main(int argc, char* argv[]) auto const duration_ms = std::chrono::duration_cast(after - before); average += duration_ms.count(); - cout << "rotate tiled(" << rotation << "): " << duration_ms.count() << " ms" << endl; + //cout << "rotate tiled(" << rotation << "): " << duration_ms.count() << " ms" << endl; - rotated->save(get_save_path("rotated_tiled", rotation)); + //rotated->save(get_save_path("rotated_tiled", rotation)); delete rotated; ++i; }