#include "base/refcnt.hh"
#include "base/str.hh"
-
+#include "base/intmath.hh"
+#include <math.h>
#include "sim/host.hh"
//
* @{
*/
+/**
+ * This is an easy way to assign all your stats to be binned or not binned. If the typedef
+ * is NoBin, nothing is binned. If it is MainBin (or whatever *Bin), then all stats are binned
+ * under that Bin.
+ */
+typedef NoBin DefaultBin;
+
/**
* This is a simple scalar statistic, like a counter.
* @sa Stat, ScalarBase, StatStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class Scalar : public Detail::ScalarBase<T, Detail::StatStor, Bin>
{
public:
* A stat that calculates the per cycle average of a value.
* @sa Stat, ScalarBase, AvgStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class Average : public Detail::ScalarBase<T, Detail::AvgStor, Bin>
{
public:
* A vector of scalar stats.
* @sa Stat, VectorBase, StatStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class Vector : public Detail::VectorBase<T, Detail::StatStor, Bin>
{ };
* A vector of Average stats.
* @sa Stat, VectorBase, AvgStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class AverageVector : public Detail::VectorBase<T, Detail::AvgStor, Bin>
{ };
* A 2-Dimensional vecto of scalar stats.
* @sa Stat, Vector2dBase, StatStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class Vector2d : public Detail::Vector2dBase<T, Detail::StatStor, Bin>
{ };
* A simple distribution stat.
* @sa Stat, DistBase, DistStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class Distribution : public Detail::DistBase<T, Detail::DistStor, Bin>
{
private:
* Calculates the mean and variance of all the samples.
* @sa Stat, DistBase, FancyStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class StandardDeviation : public Detail::DistBase<T, Detail::FancyStor, Bin>
{
private:
* Calculates the per cycle mean and variance of the samples.
* @sa Stat, DistBase, AvgFancy
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class AverageDeviation : public Detail::DistBase<T, Detail::AvgFancy, Bin>
{
private:
* A vector of distributions.
* @sa Stat, VectorDistBase, DistStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class VectorDistribution
: public Detail::VectorDistBase<T, Detail::DistStor, Bin>
{
* This is a vector of StandardDeviation stats.
* @sa Stat, VectorDistBase, FancyStor
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class VectorStandardDeviation
: public Detail::VectorDistBase<T, Detail::FancyStor, Bin>
{
* This is a vector of AverageDeviation stats.
* @sa Stat, VectorDistBase, AvgFancy
*/
-template <typename T = Counter, class Bin = NoBin>
+template <typename T = Counter, class Bin = DefaultBin>
class VectorAverageDeviation
: public Detail::VectorDistBase<T, Detail::AvgFancy, Bin>
{