gem5
v20.0.0.2
|
Templatized storage for distribution that calculates per tick mean and variance. More...
#include <statistics.hh>
Classes | |
struct | Params |
Public Member Functions | |
AvgSampleStor (Info *info) | |
Create and initialize this storage. More... | |
void | sample (Counter val, int number) |
Add a value to the distribution for the given number of times. More... | |
size_type | size () const |
Return the number of entries, in this case 1. More... | |
bool | zero () const |
Return true if no samples have been added. More... | |
void | prepare (Info *info, DistData &data) |
void | reset (Info *info) |
Reset stat value to default. More... | |
Private Attributes | |
Counter | sum |
Current total. More... | |
Counter | squares |
Current sum of squares. More... | |
Templatized storage for distribution that calculates per tick mean and variance.
Definition at line 1769 of file statistics.hh.
|
inline |
Create and initialize this storage.
Definition at line 1787 of file statistics.hh.
Definition at line 1817 of file statistics.hh.
References curTick(), Stats::Deviation, safe_cast(), Stats::DistData::samples, Stats::DistData::squares, Stats::Info::storageParams, Stats::DistData::sum, Stats::sum(), Stats::DistData::type, and Stats::DistParams::type.
|
inline |
Reset stat value to default.
Definition at line 1832 of file statistics.hh.
|
inline |
Add a value to the distribution for the given number of times.
Update the running sum and sum of squares.
val | The value to add. |
number | The number of times to add the value. |
Definition at line 1798 of file statistics.hh.
|
inline |
Return the number of entries, in this case 1.
Definition at line 1808 of file statistics.hh.
|
inline |
Return true if no samples have been added.
Definition at line 1814 of file statistics.hh.
|
private |
Current sum of squares.
Definition at line 1781 of file statistics.hh.
|
private |
Current total.
Definition at line 1779 of file statistics.hh.