From 18921ebd06dd02464e8c121a1f5619af3ad6e147 Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Thu, 15 Dec 2011 14:37:58 +0200 Subject: [PATCH] -- --- include.mk | 2 ++ t-memoize.cc | 4 ++-- timer.h | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include.mk b/include.mk index 4d2967d..648e27a 100644 --- a/include.mk +++ b/include.mk @@ -1,4 +1,6 @@ +# TODO add options from http://www.antoarts.com/the-most-useful-gcc-options-and-extensions/ +# ############################################################################ CONFIG # to set speed run as: make s=o diff --git a/t-memoize.cc b/t-memoize.cc index ea75e36..25dc591 100644 --- a/t-memoize.cc +++ b/t-memoize.cc @@ -4,8 +4,8 @@ #include using namespace std; -int f (int i) { cout << "f(" << i << ")\n"; return i+1; }; -int ff (int i, int j) { cout << "f(" << i << ", " << j << ")\n"; return i+j; }; +int f (int i) { cout << "f(" << i << ")\n"; return i+1; }; +int ff (int i, int j) { cout << "f(" << i << ", " << j << ")\n"; return i+j; }; int main() { diff --git a/timer.h b/timer.h index 4b12656..70bf6ab 100644 --- a/timer.h +++ b/timer.h @@ -22,6 +22,8 @@ namespace lvv { +// TR http://www.viva64.com/en/b/0097/ + /* OpenMP thread time? double omp_time = 0; double last_omp_time; @@ -71,6 +73,8 @@ static ostream& operator<< (ostream& os, Timer& t) __attribute__((unused)) ; class Timer { //=========================================== TIMER + // TR http://www.viva64.com/en/b/0097/ + // ------------- // article about hi-res timers: http://www.devx.com/cplus/Article/35375/0/page/2 // see also OpenMP timer: http://gcc.gnu.org/onlinedocs/libgomp/omp_005fget_005fwtime.html#omp_005fget_005fwtime // ---