Changeset 9193d9 in git
- Timestamp:
- Oct 8, 2009, 5:31:58 PM (14 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- b85e375dee0ef1d2f9b2272975f133610b000b0a
- Parents:
- 1f6c7a1cb42b3480fe6e327a47a342174f605a38
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/TestMinors.cc
r1f6c7a r9193d9 107 107 int testIntMinors (const int dummy) { 108 108 // for output of non-zero minors into file 109 PrettyPrinter prpr("minor_output_complete_ints.txt", "minor_output_results_int .txt", false, false, -1, " ");109 PrettyPrinter prpr("minor_output_complete_ints.txt", "minor_output_results_ints.txt", false, false, -1, " "); 110 110 111 111 // computes just one minor: … … 152 152 int rowCount = mat->nrows; 153 153 int columnCount = mat->ncols; 154 longtotalTimeStart, totalTime, printTimeStart, printTime;154 clock_t totalTimeStart, totalTime, printTimeStart, printTime; 155 155 string testHeader = "COMPUTE ALL MINORS IN A POLY MATRIX"; 156 156 … … 244 244 prpr << totalAdditions << " additions"; 245 245 ++prpr << "number of non-zero minors = " << nonZeroCounter; 246 ++prpr << "(time = " << totalTime<< " msec)";246 ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)"; 247 247 } 248 248 … … 318 318 prpr << totalAdditionsAccumulated << " additions)"; 319 319 ++prpr << "number of non-zero minors = " << nonZeroCounter; 320 ++prpr << "(time = " << totalTime<< " msec)";320 ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)"; 321 321 +prpr < "The cache looks like this:"; 322 322 +prpr < cch.toString(); … … 481 481 void testAllMinors(PrettyPrinter& prpr, string testHeader, int rowCount, int columnCount, int entryBound, int zeroPercentage, 482 482 int minorRows, int minorColumns, int minorSize, int randomSeed, int cacheEntries, int cacheWeight) { 483 longtotalTimeStart, totalTime, printTimeStart, printTime;483 clock_t totalTimeStart, totalTime, printTimeStart, printTime; 484 484 485 485 prpr < testHeader; … … 561 561 ++prpr << "performed in total " << totalMultiplications << " multiplications and "; 562 562 prpr << totalAdditions << " additions"; 563 ++prpr << "(time = " << totalTime<< " msec)";563 ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)"; 564 564 565 565 for (int strategy = 1; strategy <= 5; strategy++) { … … 624 624 ++prpr << "(computation without reuse would need " << totalMultiplicationsAccumulated << " and "; 625 625 prpr << totalAdditionsAccumulated << " additions)"; 626 ++prpr << "(time = " << totalTime<< " msec)";626 ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)"; 627 627 +prpr < "The cache looks like this:"; 628 628 +prpr < cch.toString(); … … 643 643 int minorSize, int randomSeed, int cacheEntries, int cacheWeight, int targetMinor, 644 644 bool checkForEquality, int maxLoops) { 645 longtotalTimeStart, totalTime, printTimeStart, printTime;645 clock_t totalTimeStart, totalTime, printTimeStart, printTime; 646 646 647 647 prpr < testHeader; … … 718 718 ++prpr << "performed in total " << totalMultiplications << " multiplications and "; 719 719 prpr << totalAdditions << " additions"; 720 ++prpr << "(time = " << totalTime<< " msec)";720 ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)"; 721 721 722 722 for (int strategy = 1; strategy <= 5; strategy++) { … … 771 771 ++prpr << "(computation without reuse would need " << totalMultiplicationsAccumulated << " and "; 772 772 prpr << totalAdditionsAccumulated << " additions)"; 773 ++prpr << "(time = " << totalTime<< " msec)";773 ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)"; 774 774 +prpr < "The cache has " < cch.getNumberOfEntries() < " (of max. " < cacheEntries < ") entries and a weight of "; 775 775 prpr < cch.getWeight() < " (of max. " < cacheWeight < ").";
Note: See TracChangeset
for help on using the changeset viewer.