summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-05-08 14:08:56 +0000
committerjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-05-08 14:08:56 +0000
commit8e20400dada3fd81f4e30b54a5ab33756349dd96 (patch)
tree84c3ef539cad84a72ef9352327a742f924597be0
parentc6c58060c31e14c5456a46f85637d6a21b51ccc6 (diff)
nicer timing output of phat.cpp
git-svn-id: https://phat.googlecode.com/svn/trunk@75 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d
-rw-r--r--src/phat.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/phat.cpp b/src/phat.cpp
index 5a7e6e1..a955b54 100644
--- a/src/phat.cpp
+++ b/src/phat.cpp
@@ -100,7 +100,9 @@ void compute_pairing( std::string input_filename, std::string output_filename, b
LOG( "Reading input file " << input_filename << " in ascii mode" )
read_successful = matrix.load_ascii( input_filename );
}
- LOG( "Reading input file took " << omp_get_wtime() - read_timer <<"s" )
+ double read_time = omp_get_wtime() - read_timer;
+ double read_time_rounded = floor( read_time * 10.0 + 0.5 ) / 10.0;
+ LOG( "Reading input file took " << setiosflags( std::ios::fixed ) << setiosflags( std::ios::showpoint ) << std::setprecision( 1 ) << read_time_rounded <<"s" )
if( !read_successful ) {
std::cerr << "Error opening file " << input_filename << std::endl;
@@ -114,7 +116,9 @@ void compute_pairing( std::string input_filename, std::string output_filename, b
phat::compute_persistence_pairs_dualized< Algorithm > ( pairs, matrix );
else
phat::compute_persistence_pairs < Algorithm > ( pairs, matrix );
- LOG( "Computing persistence pairs took " << omp_get_wtime() - pairs_timer <<"s" )
+ double pairs_time = omp_get_wtime() - pairs_timer;
+ double pairs_time_rounded = floor( pairs_time * 10.0 + 0.5 ) / 10.0;
+ LOG( "Computing persistence pairs took " << setiosflags( std::ios::fixed ) << setiosflags( std::ios::showpoint ) << std::setprecision( 1 ) << pairs_time_rounded <<"s" )
double write_timer = omp_get_wtime();
if( use_binary ) {
@@ -124,7 +128,9 @@ void compute_pairing( std::string input_filename, std::string output_filename, b
LOG( "Writing output file " << output_filename << " in ascii mode ..." )
pairs.save_ascii( output_filename );
}
- LOG( "Writing output file took " << omp_get_wtime() - write_timer <<"s" )
+ double write_time = omp_get_wtime() - write_timer;
+ double write_time_rounded = floor( write_time * 10.0 + 0.5 ) / 10.0;
+ LOG( "Writing output file took " << setiosflags( std::ios::fixed ) << setiosflags( std::ios::showpoint ) << std::setprecision( 1 ) << write_time_rounded <<"s" )
}
#define COMPUTE_PAIRING(Representation) \