Go to the documentation of this file.
59 #ifndef __BASE_STATISTICS_HH__
60 #define __BASE_STATISTICS_HH__
97 template <
class Stat,
class Base>
112 visitor.
visit(*
static_cast<Base *
>(
this));
114 bool zero()
const {
return s.zero(); }
117 template <
class Stat>
128 template <
class Stat>
150 this->
s.result(rvec);
157 template <
class Stat>
164 template <
class Stat>
173 template <
class Stat>
216 bool zero()
const {
return true; }
226 template <
class Derived,
template <
class>
class InfoProxyType>
230 typedef InfoProxyType<Derived>
Info;
233 Derived &
self() {
return *
static_cast<Derived *
>(
this); }
274 std::string common_message =
"Legacy stat is a stat that does not "
275 "belong to any statistics::Group. Legacy stat is deprecated.";
276 if (parent ==
nullptr &&
name !=
nullptr)
278 else if (parent ==
nullptr)
279 warn_once(
"One of the stats is a legacy stat. " + common_message);
295 const std::string &
name()
const {
return this->
info()->name; }
306 this->
info()->setSeparator(_sep);
311 return this->
info()->separatorString;
322 this->
info()->unit = _unit;
335 this->
info()->desc = _desc;
347 this->
info()->precision = _precision;
359 this->
info()->flags.set(_flags);
369 template <
class Stat>
373 this->
info()->prereq = prereq.info();
378 template <
class Derived,
template <
class>
class InfoProxyType>
382 typedef InfoProxyType<Derived>
Info;
386 const char *
desc =
nullptr)
403 Derived &
self = this->
self();
404 Info *
info =
self.info();
407 if (subn.size() <=
index)
408 subn.resize(
index + 1);
430 if (subd.size() <=
index)
431 subd.resize(
index + 1);
440 Derived &
self = this->
self();
443 size_t size =
self.size();
445 self.
data(
i)->prepare(
info->getStorageParams());
451 Derived &
self = this->
self();
454 size_t size =
self.size();
456 self.
data(
i)->reset(
info->getStorageParams());
460 template <
class Derived,
template <
class>
class InfoProxyType>
464 typedef InfoProxyType<Derived>
Info;
479 Derived &
self = this->
self();
484 info->y_subnames[
i] = names[
i];
491 Derived &
self = this->
self();
494 assert(
index <
self.y);
495 info->y_subnames.resize(
self.y);
503 return this->
info()->y_subnames[
i];
518 template <
class Derived,
class Stor>
538 return reinterpret_cast<Storage *
>(storage);
550 return reinterpret_cast<const Storage *
>(storage);
563 const char *
desc =
nullptr)
592 template <
typename U>
600 template <
typename U>
608 template <
typename U>
659 template <
class T,
class Enabled=
void>
680 typename
std::enable_if_t<std::is_constructible_v<std::function<Result()>,
697 template <
class T,
class V>
712 template <
class Derived>
763 template <
class T,
class V>
794 template <
class Stat>
871 template <
typename U>
883 template <
typename U>
895 template <
typename U>
920 template <
class Derived,
class Stor>
954 fatal_if(
s <= 0,
"Storage size must be positive");
1007 if (
data(
i)->zero())
1041 Derived &
self = this->
self();
1055 return Proxy(this->
self(), index);
1059 template <
class Stat>
1070 typename Stat::Storage *
1077 const typename Stat::Storage *
1135 template <
class Derived,
class Stor>
1175 fatal_if((_x <= 0) || (_y <= 0),
"Storage sizes must be positive");
1178 Derived &
self = this->
self();
1200 return Proxy(this->
self(), offset,
y);
1213 return data(0)->zero();
1272 template <
class Derived,
class Stor>
1292 return reinterpret_cast<Storage *
>(storage);
1302 return reinterpret_cast<const Storage *
>(storage);
1326 template <
typename U>
1353 data()->reset(this->
info()->getStorageParams());
1362 template <
class Stat>
1365 template <
class Derived,
class Stor>
1395 fatal_if(
s <= 0,
"Storage size must be positive");
1423 return Proxy(this->
self(), index);
1436 if (!
data(
i)->zero())
1458 template <
class Stat>
1487 template <
typename U>
1503 return data()->zero();
1544 virtual std::string
str()
const = 0;
1578 template <
class Stat>
1600 return proxy.result();
1673 std::string tmp =
"(";
1687 static std::string
str() {
return "+"; }
1693 static std::string
str() {
return "-"; }
1699 static std::string
str() {
return "*"; }
1705 static std::string
str() {
return "/"; }
1711 static std::string
str() {
return "%"; }
1717 static std::string
str() {
return "-"; }
1783 assert(lvec.size() > 0 && rvec.size() > 0);
1785 if (lvec.size() == 1 && rvec.size() == 1) {
1788 }
else if (lvec.size() == 1) {
1793 }
else if (rvec.size() == 1) {
1798 }
else if (rvec.size() == lvec.size()) {
1819 assert(lvec.size() > 0 && rvec.size() > 0);
1820 assert(lvec.size() == rvec.size() ||
1821 lvec.size() == 1 || rvec.size() == 1);
1824 if (lvec.size() == rvec.size() && lvec.size() > 1) {
1829 return op(lsum, rsum);
1847 }
else if (
rs == 1) {
1850 assert(ls ==
rs &&
"Node vector sizes are not equal");
1936 parent, nullptr, units::Unspecified::get(), nullptr)
1942 parent,
name, units::Unspecified::get(),
desc)
1947 const char *
desc =
nullptr)
1964 parent, nullptr, units::Unspecified::get(), nullptr)
1970 parent,
name, units::Unspecified::get(),
desc)
1975 const char *
desc =
nullptr)
1985 :
ValueBase<
Value>(parent, nullptr, units::Unspecified::get(), nullptr)
1995 const char *
desc =
nullptr)
2010 parent, nullptr, units::Unspecified::get(), nullptr)
2016 parent,
name, units::Unspecified::get(),
desc)
2021 const char *
desc =
nullptr)
2036 parent, nullptr, units::Unspecified::get(), nullptr)
2042 parent,
name, units::Unspecified::get(),
desc)
2047 const char *
desc =
nullptr)
2062 parent, nullptr, units::Unspecified::get(), nullptr)
2068 parent,
name, units::Unspecified::get(),
desc)
2073 const char *
desc =
nullptr)
2088 parent, nullptr, units::Unspecified::get(), nullptr)
2094 parent,
name, units::Unspecified::get(),
desc)
2099 const char *
desc =
nullptr)
2117 return this->
self();
2130 parent, nullptr, units::Unspecified::get(), nullptr)
2135 const char *
desc =
nullptr)
2137 parent,
name, units::Unspecified::get(),
desc)
2142 const char *
desc =
nullptr)
2158 return this->
self();
2174 parent, nullptr, units::Unspecified::get(), nullptr)
2182 const char *
desc =
nullptr)
2184 parent,
name, units::Unspecified::get(),
desc)
2192 const char *
desc =
nullptr)
2213 parent, nullptr, units::Unspecified::get(), nullptr)
2221 const char *
desc =
nullptr)
2223 parent,
name, units::Unspecified::get(),
desc)
2231 const char *
desc =
nullptr)
2249 units::Unspecified::get(), nullptr)
2254 const char *
desc =
nullptr)
2256 parent,
name, units::Unspecified::get(),
desc)
2262 const char *
desc =
nullptr)
2282 return this->
self();
2296 units::Unspecified::get(), nullptr)
2301 const char *
desc =
nullptr)
2303 units::Unspecified::get(),
desc)
2309 const char *
desc =
nullptr)
2326 return this->
self();
2340 nullptr, units::Unspecified::get(), nullptr)
2345 const char *
desc =
nullptr)
2347 units::Unspecified::get(),
desc)
2353 const char *
desc =
nullptr)
2370 return this->
self();
2374 template <
class Stat>
2389 this->
s.result(vec);
2395 std::string
str()
const {
return this->
s.str(); }
2398 template <
class Stat>
2409 template <
class Derived,
class Stor>
2463 template <
typename U>
2490 data()->reset(this->
info()->getStorageParams());
2499 units::Unspecified::get(), nullptr)
2504 const char *
desc =
nullptr)
2506 units::Unspecified::get(),
desc)
2511 const char *
desc =
nullptr)
2528 return this->
self();
2550 const char *
desc =
nullptr);
2553 const char *
desc =
nullptr);
2568 template<
typename T>
2627 std::string
str()
const;
2725 template <
class Stat>
2847 return Temp(std::make_shared<
BinaryNode<std::multiplies<Result> > >(
l,
r));
2859 return Temp(std::make_shared<
UnaryNode<std::negate<Result> > >(
l));
2862 template <
typename T>
2869 template <
typename T>
2879 return Temp(std::make_shared<
SumNode<std::plus<Result> > >(
val));
2931 #endif // __BASE_STATISTICS_HH__
bool check() const
Check that this stat has been set up properly and is ready for use.
This is a simple scalar statistic, like a counter.
Implementation of a distribution stat.
const VResult & result() const override
Return the result vector of this subtree.
void operator++(int)
Increment the stat by 1.
Templatized storage and interface for a distribution stat.
Temp(unsigned long long value)
Create a ConstNode.
Derived & ysubname(off_type index, const std::string &subname)
void operator+=(const U &v)
Increment the stat by the given value.
Templatized storage and interface for a sparse histogram stat.
virtual Result total() const =0
Return the total of the result vector.
void add(DistBase &d)
Add the argument distribution to the this distribution.
Temp operator+(Temp l, Temp r)
void reset()
Reset the stat to the default state.
VectorProxy(Stat &s, off_type o, size_type l)
const Storage * data() const
Retrieve a const pointer to the storage.
Histogram(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Templatized storage for distribution that calculates per tick mean and variance.
The Base class is the parent class of all unit classes.
std::vector< DistData > data
DistProxy< Derived > Proxy
A simple distribution stat.
SparseHistogram(Group *parent=nullptr)
double Result
All results are doubles.
StandardDeviation(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
char storage[sizeof(Storage)]
The storage for this stat.
Templatized storage and interface for a distribution that calculates mean and variance.
size_type size() const
Return the number of nodes in the subtree starting at this node.
bool zero() const
Return true if no samples have been added.
Vector(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
std::vector< Storage * > storage
A proxy similar to the FunctorProxy, but allows calling a method of a bound object,...
Result total() const
Return a total of all entries in this vector.
const Info * resolve(const std::string &name)
Vector2dBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
Derived & init(size_type _x, size_type _y)
GEM5_ALIGNED(8) char storage[sizeof(Storage)]
The storage for this stat.
VectorAverageDeviation(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
StandardDeviation(Group *parent, const char *name, const char *desc=nullptr)
Temp(const NodePtr &n)
Copy the given pointer to this class.
Temp(const Scalar &s)
Create a new ScalarStatNode.
Result total() const
Return the total of the result vector.
VectorDistInfoProxy(Stat &stat)
ConstVectorNode(const T &s)
Temp(double value)
Create a ConstNode.
virtual const VResult & result() const =0
VectorStandardDeviation(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
AverageDeviation(Group *parent=nullptr)
Construct and initialize this distribution.
const std::string to_string(sc_enc enc)
const Storage * data(off_type index) const
Retrieve a const pointer to the storage.
Helper class to construct formula node trees.
Counter value() const
Return the current value of this stat as its base type.
Temp(const Vector &s)
Create a new VectorStatNode.
AverageDeviation(Group *parent, const char *name, const char *desc=nullptr)
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
A stat that calculates the per tick average of a value.
Calculates the mean and variance of all the samples.
A 2-Dimensional vecto of scalar stats.
Temp(signed long long value)
Create a ConstNode.
void operator++()
Increment the stat by 1.
VectorStandardDeviation & init(size_type size)
Initialize storage for this distribution.
void reset()
Reset stat value to default.
std::vector< std::string > y_subnames
A vector of scalar stats.
const VResult & result() const
Return the result vector of this subtree.
VectorDistInfoProxy< Derived > Info
const VResult & result() const
Return the result vector of this subtree.
Distribution(Group *parent=nullptr)
Temp(const Value &s)
Create a new ScalarStatNode.
Storage * data()
Retrieve the storage.
const Storage * data() const
Retrieve a const pointer to the storage.
std::string csprintf(const char *format, const Args &...args)
Temp(unsigned short value)
Create a ConstNode.
Implementation of a scalar stat.
Derived & method(T *obj, V(T::*method)() const)
Extended functor that calls the specified method of the provided object.
DataWrapVec2d(Group *parent, const char *name, const units::Base *unit, const char *desc)
static Unspecified * get()
const ScalarProxy< Stat > proxy
void operator-=(const U &v)
Decrement the stat by the given value.
size_type size() const
Return the number of elements, always 1 for a scalar.
Temp(unsigned long value)
Create a ConstNode.
virtual std::string str() const =0
ScalarProxyNode(const ScalarProxy< Stat > &p)
Temp(const ScalarProxy< Stat > &p)
Create a new ScalarProxyNode.
This is a vector of AverageDeviation stats.
VectorStatNode(const VectorInfo *d)
The parameters for a distribution stat.
size_type size() const
Return the number of entries in this stat.
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
size_type size() const
Return the number of nodes in the subtree starting at this node.
Result total() const
Return the total of the result vector.
Temp(float value)
Create a ConstNode.
Implementation of a vector of stats.
Temp(const Average &s)
Create a new ScalarStatNode.
const Storage * data(off_type index) const
VectorAverageDeviation(Group *parent, const char *name, const char *desc=nullptr)
virtual Result result() const =0
void registerHandlers(Handler reset_handler, Handler dump_handler)
void registerDumpCallback(const std::function< void()> &callback)
Register a callback that should be called whenever statistics are about to be dumped.
void value(VCounter &vec) const
bool newStyleStats() const
Check if the info is new style stats.
Average(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Histogram(Group *parent=nullptr)
size_type size() const
Return the number of entries in this stat.
Scalar(Group *parent=nullptr)
const VResult & result() const
Return the result vector of this subtree.
Stat & stat
Pointer to the parent Vector.
Temp operator/(Temp l, Temp r)
constexpr RegId o(int index)
ScalarProxy(const ScalarProxy &sp)
Create a copy of the provided ScalarProxy.
size_type size() const override
Return the number of nodes in the subtree starting at this node.
DataWrap & operator=(const DataWrap &)=delete
Base class for formula statistic node.
void operator--(int)
Decrement the stat by 1.
VectorProxy< Derived > Proxy
virtual Result total() const =0
Info * info()
Grab the information class for this statistic.
VectorDistribution & init(size_type size, Counter min, Counter max, Counter bkt)
Initialize storage and parameters for this distribution.
void operator--(int)
Decrement the stat by 1.
SparseHistogram & init(size_type size)
Set the parameters of this histogram.
A vector of Average stats.
SparseHistInfoProxy< Derived > Info
Temp(unsigned int value)
Create a ConstNode.
VCounter cvec
Local storage for the entry values, used for printing.
This is a vector of StandardDeviation stats.
void operator++(int)
Increment the stat by 1.
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
Distribution & init(Counter min, Counter max, Counter bkt)
Set the parameters of this distribution.
const Stat::Storage * data() const
Value(Group *parent=nullptr)
std::function< Result()> functor
InfoProxyType< Derived > Info
const VResult & result() const
GEM5_ALIGNED(8) char storage[sizeof(Storage)]
The storage of this stat.
Result total() const
Return a total of all entries in this vector.
ScalarProxy< Derived > Proxy
Proxy type.
Storage * data(off_type index)
void operator-=(const U &v)
Decrement the stat by the given value.
Derived & unit(const units::Base *_unit)
Set the unit of the stat.
InfoProxyType< Derived > Info
size_type size() const
Return the number of nodes in the subtree starting at this node.
void result(VResult &vec) const
Copy the values to a local vector and return a reference to it.
Derived & subdesc(off_type index, const std::string &desc)
Set the subfield description for the given index and marks this stat to print at the end of simulatio...
ScalarProxy< Stat > operator[](off_type index)
Vector2d(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
const ScalarProxy & operator=(const ScalarProxy &sp)
Set this proxy equal to the provided one.
Result total() const
Return the total of the result vector.
size_type size() const
Return the number of nodes in the subtree starting at this node.
FunctorProxy(const T &func)
void reset()
Proxy has no state.
Temp(unsigned char value)
Create a ConstNode.
SparseHistogram(Group *parent, const char *name, const char *desc=nullptr)
void dump()
Dump all statistics data to the registered outputs.
Value(Group *parent, const char *name, const char *desc=nullptr)
const FlagsType display
Print this stat.
DistData data
Local storage for the entry values, used for printing.
const VResult & result() const
Return the result vector of this subtree.
Temp(signed long value)
Create a ConstNode.
DistBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
VectorDistribution(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Proxy operator[](off_type index)
Return a reference (ScalarProxy) to the stat at the given index.
DistProxy(const DistProxy &sp)
void operator=(const U &v)
Set the data value to the given value.
std::string ysubname(off_type i) const
void setInit()
Save Storage class parameters if any.
size_type size() const
Return the number of nodes in the subtree starting at this node.
void registerResetCallback(const std::function< void()> &callback)
Register a callback that should be called whenever statistics are reset.
virtual const VResult & result() const =0
Return the result vector of this subtree.
ScalarProxy(Stat &s, off_type i)
Create and initialize this proxy, do not register it with the database.
void processDumpQueue()
Process all the callbacks in the dump callbacks queue.
const Storage * data() const
Retrieve a const pointer to the storage.
Result total() const
Return the total of the result vector.
Derived & setSeparator(const std::string &_sep)
Set the character(s) used between the name and vector number on vectors, dist, etc.
Derived & functor(const T &func)
Temp(const AverageVector &s)
const VectorProxy & operator=(const VectorProxy &sp)
ScalarInfoProxy(Stat &stat)
void operator--()
Decrement the stat by 1.
Proxy operator[](off_type index)
void prepare()
Prepare the stat for dumping.
Proxy operator[](off_type index)
Derived & precision(int _precision)
Set the precision and marks this stat to print at the end of simulation.
NodePtr node
Pointer to a Node object.
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
virtual void visit(const ScalarInfo &info)=0
const VResult & result() const
Return the result vector of this subtree.
SparseHistInfoProxy(Stat &stat)
Scalar(Group *parent, const char *name, const char *desc=nullptr)
virtual Result total() const =0
std::string str() const override
VectorBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
Average(Group *parent=nullptr)
const DistProxy & operator=(const DistProxy &sp)
bool zero() const
Return true if no samples have been added.
Histogram & init(size_type size)
Set the parameters of this histogram.
Distribution(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
size_type size() const
Return the number of nodes in the subtree starting at this node.
const std::string & name()
NodePtr getNodePtr() const
Makde gcc < 4.6.3 happy and explicitly get the underlying node.
void(* Handler)()
Register reset and dump handlers.
Derived & functor(T &func)
Value(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
size_type size() const
Return the number of nodes in the subtree starting at this node.
V(T::* MethodPointer)() const
const Stat::Storage * data(off_type index) const
DataWrap(Group *parent, const char *name, const units::Base *unit, const char *desc)
DataWrapVec(Group *parent=nullptr, const char *name=nullptr, const units::Base *unit=units::Unspecified::get(), const char *desc=nullptr)
std::list< Info * > & statsList()
Scalar(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
const Storage * data(off_type index) const
VectorStandardDeviation(Group *parent, const char *name, const char *desc=nullptr)
Result total() const
Return the total of the result vector.
Vector2dInfoProxy(Stat &stat)
void setName(const std::string &name, bool old_style=true)
Set the name of this statistic.
Result total() const override
Return the total of the result vector.
Storage * data()
Retrieve the storage.
AverageVector(Group *parent, const char *name, const char *desc=nullptr)
Vector(Group *parent=nullptr)
BinaryNode(NodePtr &a, NodePtr &b)
Result total() const
Return the total of the result vector.
ValueBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
DistInfoProxy(Stat &stat)
InfoProxyType< Derived > Info
bool check() const
Check that this stat has been set up properly and is ready for use.
const VResult & result() const
Return the result vector of this subtree.
Derived & desc(const std::string &_desc)
Set the description and marks this stat to print at the end of simulation.
const VResult & result() const
Return the result vector of this subtree.
void reset()
Reset stat value to default.
SparseHistBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
Temp(signed int value)
Create a ConstNode.
Stat::Storage * data(off_type index)
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
Overload hash function for BasicBlockRange type.
virtual size_type size() const =0
VectorProxy(const VectorProxy &sp)
void processResetQueue()
Process all the callbacks in the reset callbacks queue.
Temp constantVector(T val)
VectorDistBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
A proxy class to access the stat at a given index in a VectorBase stat.
std::map< const void *, Info * > MapType
SparseHistData data
Local storage for the entry values, used for printing.
Storage * data(off_type index)
The parameters for a sparse histogram stat.
virtual size_type size() const =0
Return the number of nodes in the subtree starting at this node.
const Info * info() const
void sample(const U &v, int n=1)
std::shared_ptr< Node > NodePtr
Shared pointer to a function Node.
VectorAverageDeviation & init(size_type size)
Initialize storage for this distribution.
double Counter
All counters are of 64-bit values.
AverageVector(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
virtual Counter value() const =0
ScalarBase(Group *parent=nullptr, const char *name=nullptr, const units::Base *unit=units::Unspecified::get(), const char *desc=nullptr)
void visit(Output &visitor)
void addStat(statistics::Info *info)
Register a stat with this group.
Derived & scalar(T &value)
const std::string & name() const
Derived & ysubnames(const char **names)
Templatized storage and interface for a histogram stat.
AverageVector(Group *parent=nullptr)
SparseHistogram(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
AverageDeviation(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
const std::string & setSeparator() const
void operator--()
Decrement the stat by 1.
Vector2d(Group *parent=nullptr)
Templatized storage and interface for a simple scalar stat.
void reset()
Reset stat value to default.
DistProxy(Stat &s, off_type i)
void operator=(const U &v)
Set the data value to the given value.
A vector of distributions.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Average(Group *parent, const char *name, const char *desc=nullptr)
Vector(Group *parent, const char *name, const char *desc=nullptr)
void setInfo(Group *parent, Info *info)
Set up an info class for this statistic.
Vector2d(Group *parent, const char *name, const char *desc=nullptr)
std::vector< Storage * > storage
Storage * data()
Retrieve the storage.
VectorDistribution(Group *parent=nullptr)
Temp(signed short value)
Create a ConstNode.
void operator++()
Increment the stat by 1.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
DistInfoProxy< Derived > Info
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
The parameters for a distribution stat.
void operator+=(const U &v)
Increment the stat by the given value.
Implementation of a sparse histogram stat.
Derived & init(size_type size)
Set this vector to have the given size.
void setParams(const StorageParams *params)
Save Storage class parameters if any.
Temp operator*(Temp l, Temp r)
size_type size() const
Return the number of elements, always 1 for a scalar.
VectorAverageDeviation(Group *parent=nullptr)
VectorInfoProxy(Stat &stat)
Result total() const
Return the total of the result vector.
MethodProxy(T *obj, MethodPointer meth)
Calculates the per tick mean and variance of the samples.
StorageParams const * getStorageParams() const
Getter for the storage params.
VectorStandardDeviation(Group *parent=nullptr)
Result result() const
Return the current value of this statas a result type.
void visit(Output &visitor)
Visitor entry for outputing statistics data.
Vector2dInfoProxy< Derived > Info
VectorDistribution(Group *parent, const char *name, const char *desc=nullptr)
Histogram(Group *parent, const char *name, const char *desc=nullptr)
ScalarStatNode(const ScalarInfo *d)
Distribution(Group *parent, const char *name, const char *desc=nullptr)
std::string name
The name of the stat.
Storage * data(off_type index)
Retrieve the storage.
Temp(signed char value)
Create a ConstNode.
StandardDeviation(Group *parent=nullptr)
Construct and initialize this distribution.
off_type index
The index to access in the parent VectorBase.
void reset()
Reset the stat to the default state.
Temp operator-(Temp l, Temp r)
Templatized storage and interface to a per-tick average stat.
Counter value() const
Return the current value of this stat as its base type.
std::vector< Storage * > storage
The storage of this stat.
const VResult & result() const
Generated on Sun Jul 30 2023 01:56:51 for gem5 by doxygen 1.8.17