Go to the documentation of this file.
59 #ifndef __BASE_STATISTICS_HH__
60 #define __BASE_STATISTICS_HH__
98 template <
class Stat,
class Base>
113 visitor.
visit(*
static_cast<Base *
>(
this));
115 bool zero()
const {
return s.zero(); }
118 template <
class Stat>
129 template <
class Stat>
151 this->
s.result(rvec);
158 template <
class Stat>
165 template <
class Stat>
174 template <
class Stat>
214 bool zero()
const {
return true; }
224 template <
class Derived,
template <
class>
class InfoProxyType>
228 typedef InfoProxyType<Derived>
Info;
231 Derived &
self() {
return *
static_cast<Derived *
>(
this); }
262 info->setName(
name, parent ==
nullptr);
272 std::string common_message =
"Legacy stat is a stat that does not "
273 "belong to any statistics::Group. Legacy stat is deprecated.";
274 if (parent ==
nullptr &&
name !=
nullptr)
276 else if (parent ==
nullptr)
277 warn_once(
"One of the stats is a legacy stat. " + common_message);
293 const std::string &
name()
const {
return this->
info()->name; }
304 this->
info()->setSeparator(_sep);
309 return this->
info()->separatorString;
320 this->
info()->unit = _unit;
333 this->
info()->desc = _desc;
345 this->
info()->precision = _precision;
357 this->
info()->flags.set(_flags);
367 template <
class Stat>
371 this->
info()->prereq = prereq.info();
376 template <
class Derived,
template <
class>
class InfoProxyType>
380 typedef InfoProxyType<Derived>
Info;
384 const char *
desc =
nullptr)
401 Derived &
self = this->
self();
402 Info *
info =
self.info();
405 if (subn.size() <=
index)
406 subn.resize(
index + 1);
428 if (subd.size() <=
index)
429 subd.resize(
index + 1);
438 Derived &
self = this->
self();
441 size_t size =
self.size();
443 self.
data(
i)->prepare(
info->getStorageParams());
449 Derived &
self = this->
self();
452 size_t size =
self.size();
454 self.
data(
i)->reset(
info->getStorageParams());
458 template <
class Derived,
template <
class>
class InfoProxyType>
462 typedef InfoProxyType<Derived>
Info;
477 Derived &
self = this->
self();
489 Derived &
self = this->
self();
492 assert(
index <
self.y);
493 info->y_subnames.resize(
self.y);
501 return this->
info()->y_subnames[
i];
516 template <
class Derived,
class Stor>
536 return reinterpret_cast<Storage *
>(storage);
548 return reinterpret_cast<const Storage *
>(storage);
561 const char *
desc =
nullptr)
590 template <
typename U>
598 template <
typename U>
606 template <
typename U>
657 template <
class T,
class Enabled=
void>
678 typename
std::enable_if_t<std::is_constructible<std::function<Result()>,
695 template <
class T,
class V>
710 template <
class Derived>
761 template <
class T,
class V>
792 template <
class Stat>
869 template <
typename U>
881 template <
typename U>
893 template <
typename U>
918 template <
class Derived,
class Stor>
952 fatal_if(
s <= 0,
"Storage size must be positive");
1005 if (
data(
i)->zero())
1039 Derived &
self = this->
self();
1053 return Proxy(this->
self(), index);
1057 template <
class Stat>
1068 typename Stat::Storage *
1075 const typename Stat::Storage *
1133 template <
class Derived,
class Stor>
1173 fatal_if((_x <= 0) || (_y <= 0),
"Storage sizes must be positive");
1176 Derived &
self = this->
self();
1198 return Proxy(this->
self(), offset,
y);
1211 return data(0)->zero();
1270 template <
class Derived,
class Stor>
1290 return reinterpret_cast<Storage *
>(storage);
1300 return reinterpret_cast<const Storage *
>(storage);
1324 template <
typename U>
1351 data()->reset(this->
info()->getStorageParams());
1360 template <
class Stat>
1363 template <
class Derived,
class Stor>
1393 fatal_if(
s <= 0,
"Storage size must be positive");
1421 return Proxy(this->
self(), index);
1434 if (!
data(
i)->zero())
1456 template <
class Stat>
1485 template <
typename U>
1501 return data()->zero();
1542 virtual std::string
str()
const = 0;
1576 template <
class Stat>
1598 return proxy.result();
1671 std::string tmp =
"(";
1685 static std::string
str() {
return "+"; }
1691 static std::string
str() {
return "-"; }
1697 static std::string
str() {
return "*"; }
1703 static std::string
str() {
return "/"; }
1709 static std::string
str() {
return "%"; }
1715 static std::string
str() {
return "-"; }
1781 assert(lvec.size() > 0 && rvec.size() > 0);
1783 if (lvec.size() == 1 && rvec.size() == 1) {
1786 }
else if (lvec.size() == 1) {
1791 }
else if (rvec.size() == 1) {
1796 }
else if (rvec.size() == lvec.size()) {
1817 assert(lvec.size() > 0 && rvec.size() > 0);
1818 assert(lvec.size() == rvec.size() ||
1819 lvec.size() == 1 || rvec.size() == 1);
1822 if (lvec.size() == rvec.size() && lvec.size() > 1) {
1827 return op(lsum, rsum);
1845 }
else if (
rs == 1) {
1848 assert(ls ==
rs &&
"Node vector sizes are not equal");
1934 parent, nullptr, units::Unspecified::get(), nullptr)
1940 parent,
name, units::Unspecified::get(),
desc)
1945 const char *
desc =
nullptr)
1962 parent, nullptr, units::Unspecified::get(), nullptr)
1968 parent,
name, units::Unspecified::get(),
desc)
1973 const char *
desc =
nullptr)
1983 :
ValueBase<
Value>(parent, nullptr, units::Unspecified::get(), nullptr)
1993 const char *
desc =
nullptr)
2008 parent, nullptr, units::Unspecified::get(), nullptr)
2014 parent,
name, units::Unspecified::get(),
desc)
2019 const char *
desc =
nullptr)
2034 parent, nullptr, units::Unspecified::get(), nullptr)
2040 parent,
name, units::Unspecified::get(),
desc)
2045 const char *
desc =
nullptr)
2060 parent, nullptr, units::Unspecified::get(), nullptr)
2066 parent,
name, units::Unspecified::get(),
desc)
2071 const char *
desc =
nullptr)
2086 parent, nullptr, units::Unspecified::get(), nullptr)
2092 parent,
name, units::Unspecified::get(),
desc)
2097 const char *
desc =
nullptr)
2115 return this->
self();
2128 parent, nullptr, units::Unspecified::get(), nullptr)
2133 const char *
desc =
nullptr)
2135 parent,
name, units::Unspecified::get(),
desc)
2140 const char *
desc =
nullptr)
2156 return this->
self();
2172 parent, nullptr, units::Unspecified::get(), nullptr)
2180 const char *
desc =
nullptr)
2182 parent,
name, units::Unspecified::get(),
desc)
2190 const char *
desc =
nullptr)
2211 parent, nullptr, units::Unspecified::get(), nullptr)
2219 const char *
desc =
nullptr)
2221 parent,
name, units::Unspecified::get(),
desc)
2229 const char *
desc =
nullptr)
2247 units::Unspecified::get(), nullptr)
2252 const char *
desc =
nullptr)
2254 parent,
name, units::Unspecified::get(),
desc)
2260 const char *
desc =
nullptr)
2280 return this->
self();
2294 units::Unspecified::get(), nullptr)
2299 const char *
desc =
nullptr)
2301 units::Unspecified::get(),
desc)
2307 const char *
desc =
nullptr)
2324 return this->
self();
2338 nullptr, units::Unspecified::get(), nullptr)
2343 const char *
desc =
nullptr)
2345 units::Unspecified::get(),
desc)
2351 const char *
desc =
nullptr)
2368 return this->
self();
2372 template <
class Stat>
2387 this->
s.result(vec);
2393 std::string
str()
const {
return this->
s.str(); }
2396 template <
class Stat>
2407 template <
class Derived,
class Stor>
2461 template <
typename U>
2488 data()->reset(this->
info()->getStorageParams());
2497 units::Unspecified::get(), nullptr)
2502 const char *
desc =
nullptr)
2504 units::Unspecified::get(),
desc)
2509 const char *
desc =
nullptr)
2526 return this->
self();
2548 const char *
desc =
nullptr);
2551 const char *
desc =
nullptr);
2566 template<
typename T>
2625 std::string
str()
const;
2723 template <
class Stat>
2845 return Temp(std::make_shared<
BinaryNode<std::multiplies<Result> > >(
l,
r));
2857 return Temp(std::make_shared<
UnaryNode<std::negate<Result> > >(
l));
2860 template <
typename T>
2867 template <
typename T>
2877 return Temp(std::make_shared<
SumNode<std::plus<Result> > >(
val));
2929 #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.
std::function< Result()> functor
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
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)
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)
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.
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)
static const char *const names[NumModes]
ScalarInfoProxy(Stat &stat)
void operator--()
Decrement the stat by 1.
FunctorProxy(const T &func)
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.
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
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 Tue Sep 21 2021 12:24:58 for gem5 by doxygen 1.8.17