gem5
|
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 1744 of file statistics.hh.
|
inline |
Create and initialize this storage.
Definition at line 1762 of file statistics.hh.
Definition at line 1793 of file statistics.hh.
References curTick(), Stats::Deviation, safe_cast(), Stats::DistData::samples, Stats::DistData::squares, squares, Stats::Info::storageParams, Stats::DistData::sum, sum, Stats::DistData::type, and Stats::DistParams::type.
|
inline |
Reset stat value to default.
Definition at line 1808 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 1773 of file statistics.hh.
|
inline |
Return the number of entries, in this case 1.
Definition at line 1784 of file statistics.hh.
|
inline |
Return true if no samples have been added.
Definition at line 1790 of file statistics.hh.
References sum.
|
private |
Current sum of squares.
Definition at line 1756 of file statistics.hh.
|
private |