src/benchmark/bench_tools.h
changeset 718 75d36edc6bc4
parent 711 b6c56353832c
child 742 235fd36336b7
     1.1 --- a/src/benchmark/bench_tools.h	Wed Jul 21 07:01:14 2004 +0000
     1.2 +++ b/src/benchmark/bench_tools.h	Wed Jul 21 07:03:20 2004 +0000
     1.3 @@ -3,6 +3,9 @@
     1.4  #define HUGO_BENCH_TEST_H
     1.5  
     1.6  #include<vector>
     1.7 +#include<iostream>
     1.8 +
     1.9 +#include<hugo/time_measure.h>
    1.10  
    1.11  ///An experimental typedef factory
    1.12  #define GRAPH_TYPEDEF_FACTORY(Graph) \
    1.13 @@ -23,6 +26,8 @@
    1.14   
    1.15  
    1.16  ///A primitive primtest
    1.17 +
    1.18 +///\bug 2 is not a prime according to this function!
    1.19  bool isPrim(int n)
    1.20  {
    1.21    if(n%2) {
    1.22 @@ -69,5 +74,13 @@
    1.23      }
    1.24  };
    1.25  
    1.26 +inline void PrintTime(char *ID,hugo::Timer &T) 
    1.27 +{
    1.28 +  hugo::TimeStamp S(T);
    1.29 +  std::cout << ID << ' ' << S.getUserTime() << ' '
    1.30 +	    << S.getSystemTime() << ' ' << S.getRealTime() << std::endl;
    1.31 +}
    1.32 +
    1.33 +  
    1.34  
    1.35  #endif