Changeset 9193d9 in git


Ignore:
Timestamp:
Oct 8, 2009, 5:31:58 PM (15 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b85e375dee0ef1d2f9b2272975f133610b000b0a
Parents:
1f6c7a1cb42b3480fe6e327a47a342174f605a38
Message:
changed time measurements


git-svn-id: file:///usr/local/Singular/svn/trunk@12176 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/TestMinors.cc

    r1f6c7a r9193d9  
    107107int testIntMinors (const int dummy) {
    108108  // 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, "   ");
    110110
    111111  // computes just one minor:
     
    152152  int rowCount = mat->nrows;
    153153  int columnCount = mat->ncols;
    154   long totalTimeStart, totalTime, printTimeStart, printTime;
     154  clock_t totalTimeStart, totalTime, printTimeStart, printTime;
    155155  string testHeader = "COMPUTE ALL MINORS IN A POLY MATRIX";
    156156
     
    244244    prpr << totalAdditions << " additions";
    245245    ++prpr << "number of non-zero minors = " << nonZeroCounter;
    246     ++prpr << "(time = " << totalTime << " msec)";
     246    ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)";
    247247  }
    248248
     
    318318      prpr << totalAdditionsAccumulated << " additions)";
    319319      ++prpr << "number of non-zero minors = " << nonZeroCounter;
    320       ++prpr << "(time = " << totalTime << " msec)";
     320      ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)";
    321321      +prpr < "The cache looks like this:";
    322322      +prpr < cch.toString();
     
    481481void testAllMinors(PrettyPrinter& prpr, string testHeader, int rowCount, int columnCount, int entryBound, int zeroPercentage,
    482482                   int minorRows, int minorColumns, int minorSize, int randomSeed, int cacheEntries, int cacheWeight) {
    483     long totalTimeStart, totalTime, printTimeStart, printTime;
     483    clock_t totalTimeStart, totalTime, printTimeStart, printTime;
    484484
    485485    prpr < testHeader;
     
    561561    ++prpr << "performed in total " << totalMultiplications << " multiplications and ";
    562562    prpr << totalAdditions << " additions";
    563     ++prpr << "(time = " << totalTime << " msec)";
     563    ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)";
    564564
    565565    for (int strategy = 1; strategy <= 5; strategy++) {
     
    624624        ++prpr << "(computation without reuse would need " << totalMultiplicationsAccumulated << " and ";
    625625        prpr << totalAdditionsAccumulated << " additions)";
    626         ++prpr << "(time = " << totalTime << " msec)";
     626        ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)";
    627627        +prpr < "The cache looks like this:";
    628628        +prpr < cch.toString();
     
    643643                        int minorSize, int randomSeed, int cacheEntries, int cacheWeight, int targetMinor,
    644644                        bool checkForEquality, int maxLoops) {
    645     long totalTimeStart, totalTime, printTimeStart, printTime;
     645    clock_t totalTimeStart, totalTime, printTimeStart, printTime;
    646646
    647647    prpr < testHeader;
     
    718718    ++prpr << "performed in total " << totalMultiplications << " multiplications and ";
    719719    prpr << totalAdditions << " additions";
    720     ++prpr << "(time = " << totalTime << " msec)";
     720    ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)";
    721721
    722722    for (int strategy = 1; strategy <= 5; strategy++) {
     
    771771        ++prpr << "(computation without reuse would need " << totalMultiplicationsAccumulated << " and ";
    772772        prpr << totalAdditionsAccumulated << " additions)";
    773         ++prpr << "(time = " << totalTime << " msec)";
     773        ++prpr << "(time = " << ((totalTime * 1000) / CLOCKS_PER_SEC) << " msec)";
    774774        +prpr < "The cache has " < cch.getNumberOfEntries() < " (of max. " < cacheEntries < ") entries and a weight of ";
    775775        prpr < cch.getWeight() < " (of max. " < cacheWeight < ").";
Note: See TracChangeset for help on using the changeset viewer.