X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=check%2Ftime_lw_Qprime.cpp;h=c1306adcdc169b9d8b5a8939eb082086d58a1df9;hb=a405eece0da232b296c4b400a89df4f43e39232d;hp=6bbf6d11026e3124c59fe59d16d96839c7e6ca5b;hpb=383d5eb3b0f0506810d9105a268f939125bfc347;p=ginac.git diff --git a/check/time_lw_Qprime.cpp b/check/time_lw_Qprime.cpp index 6bbf6d11..c1306adc 100644 --- a/check/time_lw_Qprime.cpp +++ b/check/time_lw_Qprime.cpp @@ -23,6 +23,8 @@ #include "times.h" +static const bool do_test = false; // set to true in order to run this beast + static unsigned test(void) { // same matrix as in test P': @@ -74,21 +76,26 @@ unsigned time_lw_Qprime(void) cout << "timing Lewis-Wester test Q' (charpoly(P'))" << flush; clog << "-------Lewis-Wester test Q' (charpoly(P'))" << endl; - rolex.start(); - // correct for very small times: - do { - result = test(); - ++count; - } while ((time=rolex.read())<0.1 && !result); - cout << '.' << flush; - - if (!result) { - cout << " passed "; - clog << "(no output)" << endl; + if (do_test) { + rolex.start(); + // correct for very small times: + do { + result = test(); + ++count; + } while ((time=rolex.read())<0.1 && !result); + cout << '.' << flush; + + if (!result) { + cout << " passed "; + clog << "(no output)" << endl; + } else { + cout << " failed "; + } + cout << int(1000*(time/count))*0.001 << 's' << endl; } else { - cout << " failed "; + cout << " disabled" << endl; + clog << "(no output)" << endl; } - cout << int(1000*(time/count))*0.001 << 's' << endl; return result; }