gem5
[DEVELOP-FOR-23.0]
|
Implements an n bit saturating counter and provides methods to increment, decrement, and read it. More...
#include <sat_counter.hh>
Public Member Functions | |
GenericSatCounter ()=delete | |
The default constructor should never be used. More... | |
GenericSatCounter (unsigned bits, T initial_val=0) | |
Constructor for the counter. More... | |
GenericSatCounter (const GenericSatCounter &other) | |
Copy constructor. More... | |
GenericSatCounter & | operator= (const GenericSatCounter &other) |
Copy assignment. More... | |
GenericSatCounter (GenericSatCounter &&other) | |
Move constructor. More... | |
GenericSatCounter & | operator= (GenericSatCounter &&other) |
Move assignment. More... | |
void | swap (GenericSatCounter &other) |
Swap the contents of every member of the class. More... | |
GenericSatCounter & | operator++ () |
Pre-increment operator. More... | |
GenericSatCounter | operator++ (int) |
Post-increment operator. More... | |
GenericSatCounter & | operator-- () |
Pre-decrement operator. More... | |
GenericSatCounter | operator-- (int) |
Post-decrement operator. More... | |
GenericSatCounter & | operator>>= (const int &shift) |
Shift-right-assignment. More... | |
GenericSatCounter & | operator<<= (const int &shift) |
Shift-left-assignment. More... | |
GenericSatCounter & | operator+= (const long long &value) |
Add-assignment. More... | |
GenericSatCounter & | operator-= (const long long &value) |
Subtract-assignment. More... | |
operator T () const | |
Read the counter's value. More... | |
void | reset () |
Reset the counter to its initial value. More... | |
double | calcSaturation () const |
Calculate saturation percentile of the current counter's value with regard to its maximum possible value. More... | |
bool | isSaturated () const |
Whether the counter has achieved its maximum value or not. More... | |
T | saturate () |
Saturate the counter. More... | |
Private Attributes | |
T | initialVal |
T | maxVal |
T | counter |
Implements an n bit saturating counter and provides methods to increment, decrement, and read it.
T | The type of the underlying counter container. |
Definition at line 60 of file sat_counter.hh.
|
delete |
The default constructor should never be used.
|
private |
Definition at line 331 of file sat_counter.hh.
Referenced by gem5::GenericSatCounter< uint8_t >::calcSaturation(), gem5::GenericSatCounter< uint8_t >::GenericSatCounter(), gem5::prefetch::SignaturePath::PatternEntry::getStrideEntry(), gem5::prefetch::SignaturePathV2::increasePatternEntryCounter(), gem5::GenericSatCounter< uint8_t >::isSaturated(), gem5::GenericSatCounter< uint8_t >::operator uint8_t(), gem5::GenericSatCounter< uint8_t >::operator++(), gem5::GenericSatCounter< uint8_t >::operator+=(), gem5::GenericSatCounter< uint8_t >::operator--(), gem5::GenericSatCounter< uint8_t >::operator-=(), gem5::GenericSatCounter< uint8_t >::operator<<=(), gem5::GenericSatCounter< uint8_t >::operator=(), gem5::GenericSatCounter< uint8_t >::operator>>=(), gem5::GenericSatCounter< uint8_t >::reset(), gem5::GenericSatCounter< uint8_t >::saturate(), and gem5::GenericSatCounter< uint8_t >::swap().
|
private |
Definition at line 329 of file sat_counter.hh.
Referenced by gem5::GenericSatCounter< uint8_t >::GenericSatCounter(), gem5::GenericSatCounter< uint8_t >::operator=(), gem5::GenericSatCounter< uint8_t >::reset(), and gem5::GenericSatCounter< uint8_t >::swap().
|
private |
Definition at line 330 of file sat_counter.hh.
Referenced by gem5::GenericSatCounter< uint8_t >::calcSaturation(), gem5::GenericSatCounter< uint8_t >::GenericSatCounter(), gem5::GenericSatCounter< uint8_t >::isSaturated(), gem5::GenericSatCounter< uint8_t >::operator++(), gem5::GenericSatCounter< uint8_t >::operator+=(), gem5::GenericSatCounter< uint8_t >::operator<<=(), gem5::GenericSatCounter< uint8_t >::operator=(), gem5::GenericSatCounter< uint8_t >::saturate(), and gem5::GenericSatCounter< uint8_t >::swap().