Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/logging/log-analyze/quantize.cxx
ViewVC logotype

Diff of /branches/vis15/src/logging/log-analyze/quantize.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4888, Thu Jan 5 17:46:52 2017 UTC revision 4889, Thu Jan 5 19:32:00 2017 UTC
# Line 50  Line 50 
50          std::cerr << "addTime: end time " << endT << " is after run time " << this->_runT << "\n";          std::cerr << "addTime: end time " << endT << " is after run time " << this->_runT << "\n";
51          exit (1);          exit (1);
52      }      }
     uint64_t dt = endT - startT;  
53      uint32_t startB = startT / this->_timeQ;      uint32_t startB = startT / this->_timeQ;
54      uint32_t endB = endT / this->_timeQ;      uint32_t endB = endT / this->_timeQ;
55      sid += 1;  // state 0 holds total time      sid += 1;  // state 0 holds total time
# Line 60  Line 59 
59      else {      else {
60          uint64_t t = (startB + 1) * this->_timeQ;          uint64_t t = (startB + 1) * this->_timeQ;
61          while (t < endT) {          while (t < endT) {
62              dt = t - startT;              uint64_t dt = t - startT;
63              this->_bucket[this->_index(tid, startB, sid)] += (t - startT);              this->_bucket[this->_index(tid, startB, sid)] += (t - startT);
64              startT = t;              startT = t;
65              t += this->_timeQ;              t += this->_timeQ;
# Line 78  Line 77 
77          for (uint32_t j = 0;  j < this->_nBuckets;  j++) {          for (uint32_t j = 0;  j < this->_nBuckets;  j++) {
78              uint64_t t = 0;              uint64_t t = 0;
79              for (uint32_t k = 1;  k < this->_nStates;  k++) {              for (uint32_t k = 1;  k < this->_nStates;  k++) {
80                  t += this->_bucket[this->_index(i, j, k)] = 0;                  t += this->_bucket[this->_index(i, j, k)];
81              }              }
82              this->_bucket[this->_index(i, j, 0)] = t;              this->_bucket[this->_index(i, j, 0)] = t;
83          }          }

Legend:
Removed from v.4888  
changed lines
  Added in v.4889

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0