summaryrefslogtreecommitdiff
path: root/base/statistics.hh
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2003-11-04 18:19:03 -0500
committerLisa Hsu <hsul@eecs.umich.edu>2003-11-04 18:19:03 -0500
commit16d0b2f85ac8527895df09235124798ad6518779 (patch)
tree97c9f8e28b3ccc1ac98bc29c008b381c11c36b58 /base/statistics.hh
parent553df008cfec3f4a0bd86c8e5730bde544c26e3d (diff)
downloadgem5-16d0b2f85ac8527895df09235124798ad6518779.tar.xz
Hack to enable perl totaling of standard deviation statistics.
statistics.hh: same statistics.cc: Hack to enable perl totaling. make FancyDisplay print a total parameter to enable totaling standard deviations for bins after a run is over with perl. currently a total hack. base/statistics.cc: Hack to enable perl totaling. make FancyDisplay print a total parameter to enable totaling standard deviations for bins after a run is over with perl. currently a total hack. base/statistics.hh: same --HG-- extra : convert_revision : c4087a138543e66acee4e395617ce7fd7e458a39
Diffstat (limited to 'base/statistics.hh')
-rw-r--r--base/statistics.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/statistics.hh b/base/statistics.hh
index aa3489727..fc3252782 100644
--- a/base/statistics.hh
+++ b/base/statistics.hh
@@ -1309,7 +1309,7 @@ struct DistStor
void FancyDisplay(std::ostream &stream, const std::string &name,
const std::string &desc, int precision, FormatFlags flags,
- result_t mean, result_t variance);
+ result_t mean, result_t variance, result_t total);
/**
* Templatized storage and interface for a distribution that calculates mean
@@ -1369,16 +1369,16 @@ struct FancyStor
result_t mean = NAN;
result_t variance = NAN;
+ result_t ftot = total;
if (total != 0) {
result_t fsum = sum;
result_t fsq = squares;
- result_t ftot = total;
mean = fsum / ftot;
variance = (ftot * fsq - (fsum * fsum)) / (ftot * (ftot - 1.0));
}
- FancyDisplay(stream, name, desc, precision, flags, mean, variance);
+ FancyDisplay(stream, name, desc, precision, flags, mean, variance, ftot);
}
/**