gem5 v24.0.0.0
|
Templatized storage and interface for a distribution that calculates mean and variance. More...
#include <storage.hh>
Classes | |
struct | Params |
Public Member Functions | |
SampleStor (const StorageParams *const storage_params) | |
Create and initialize this storage. | |
void | sample (Counter val, int number) |
Add a value the given number of times to this running average. | |
size_type | size () const |
Return the number of entries in this stat, 1. | |
bool | zero () const |
Return true if no samples have been added. | |
void | prepare (const StorageParams *const storage_params, DistData &data) |
void | reset (const StorageParams *const storage_params) |
Reset stat value to default. | |
Private Attributes | |
Counter | sum |
The current sum. | |
Counter | squares |
The sum of squares. | |
Counter | samples |
The number of samples. | |
Templatized storage and interface for a distribution that calculates mean and variance.
Definition at line 559 of file storage.hh.
|
inline |
Create and initialize this storage.
Definition at line 578 of file storage.hh.
|
inline |
Definition at line 610 of file storage.hh.
References data, gem5::statistics::Deviation, gem5::safe_cast(), samples, squares, sum, and gem5::statistics::DistParams::type.
|
inline |
|
inline |
Add a value the given number of times to this running average.
Update the running sum and sum of squares, increment the number of values seen by the given number.
val | The value to add. |
number | The number of times to add the value. |
Definition at line 590 of file storage.hh.
References samples, squares, sum, and gem5::X86ISA::val.
|
inline |
Return the number of entries in this stat, 1.
Definition at line 601 of file storage.hh.
Referenced by TEST().
|
inline |
Return true if no samples have been added.
Definition at line 607 of file storage.hh.
References samples.
|
private |
|
private |
The sum of squares.
Definition at line 565 of file storage.hh.
|
private |
The current sum.
Definition at line 563 of file storage.hh.