|
gem5 [DEVELOP-FOR-25.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. | |
| GenericSatCounter (unsigned bits, T initial_val=0) | |
| Constructor for the counter. | |
| GenericSatCounter (const GenericSatCounter &other) | |
| Copy constructor. | |
| GenericSatCounter & | operator= (const GenericSatCounter &other) |
| Copy assignment. | |
| GenericSatCounter (GenericSatCounter &&other) | |
| Move constructor. | |
| GenericSatCounter & | operator= (GenericSatCounter &&other) |
| Move assignment. | |
| void | swap (GenericSatCounter &other) |
| Swap the contents of every member of the class. | |
| GenericSatCounter & | operator++ () |
| Pre-increment operator. | |
| GenericSatCounter | operator++ (int) |
| Post-increment operator. | |
| GenericSatCounter & | operator-- () |
| Pre-decrement operator. | |
| GenericSatCounter | operator-- (int) |
| Post-decrement operator. | |
| GenericSatCounter & | operator>>= (const int &shift) |
| Shift-right-assignment. | |
| GenericSatCounter & | operator<<= (const int &shift) |
| Shift-left-assignment. | |
| GenericSatCounter & | operator+= (const long long &value) |
| Add-assignment. | |
| GenericSatCounter & | operator-= (const long long &value) |
| Subtract-assignment. | |
| operator T () const | |
| Read the counter's value. | |
| void | reset () |
| Reset the counter to its initial value. | |
| double | calcSaturation () const |
| Calculate saturation percentile of the current counter's value with regard to its maximum possible value. | |
| bool | isSaturated () const |
| Whether the counter has achieved its maximum value or not. | |
| T | saturate () |
| Saturate the counter. | |
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 operator T(), and gem5::GenericSatCounter< uint8_t >::swap().
|
private |
Definition at line 329 of file sat_counter.hh.
Referenced by gem5::GenericSatCounter< uint8_t >::swap().
|
private |
Definition at line 330 of file sat_counter.hh.
Referenced by gem5::GenericSatCounter< uint8_t >::swap().