gem5 v24.0.0.0
Loading...
Searching...
No Matches
The SatCounter API.

Functions

 gem5::GenericSatCounter< T >::GenericSatCounter (unsigned bits, T initial_val=0)
 Constructor for the counter.
 
 gem5::GenericSatCounter< T >::GenericSatCounter (const GenericSatCounter &other)
 Copy constructor.
 
GenericSatCountergem5::GenericSatCounter< T >::operator= (const GenericSatCounter &other)
 Copy assignment.
 
 gem5::GenericSatCounter< T >::GenericSatCounter (GenericSatCounter &&other)
 Move constructor.
 
GenericSatCountergem5::GenericSatCounter< T >::operator= (GenericSatCounter &&other)
 Move assignment.
 
void gem5::GenericSatCounter< T >::swap (GenericSatCounter &other)
 Swap the contents of every member of the class.
 
GenericSatCountergem5::GenericSatCounter< T >::operator++ ()
 Pre-increment operator.
 
GenericSatCounter gem5::GenericSatCounter< T >::operator++ (int)
 Post-increment operator.
 
GenericSatCountergem5::GenericSatCounter< T >::operator-- ()
 Pre-decrement operator.
 
GenericSatCounter gem5::GenericSatCounter< T >::operator-- (int)
 Post-decrement operator.
 
GenericSatCountergem5::GenericSatCounter< T >::operator>>= (const int &shift)
 Shift-right-assignment.
 
GenericSatCountergem5::GenericSatCounter< T >::operator<<= (const int &shift)
 Shift-left-assignment.
 
GenericSatCountergem5::GenericSatCounter< T >::operator+= (const long long &value)
 Add-assignment.
 
GenericSatCountergem5::GenericSatCounter< T >::operator-= (const long long &value)
 Subtract-assignment.
 
 gem5::GenericSatCounter< T >::operator T () const
 Read the counter's value.
 
void gem5::GenericSatCounter< T >::reset ()
 Reset the counter to its initial value.
 
double gem5::GenericSatCounter< T >::calcSaturation () const
 Calculate saturation percentile of the current counter's value with regard to its maximum possible value.
 
bool gem5::GenericSatCounter< T >::isSaturated () const
 Whether the counter has achieved its maximum value or not.
 
gem5::GenericSatCounter< T >::saturate ()
 Saturate the counter.
 
typedef GenericSatCounter< uint8_t > gem5::SatCounter8
 
typedef GenericSatCounter< uint16_t > gem5::SatCounter16
 
typedef GenericSatCounter< uint32_t > gem5::SatCounter32
 
typedef GenericSatCounter< uint64_t > gem5::SatCounter64
 

Detailed Description

These methods relate to the SatCounter interface.

Typedef Documentation

◆ SatCounter16

Definition at line 338 of file sat_counter.hh.

◆ SatCounter32

Definition at line 339 of file sat_counter.hh.

◆ SatCounter64

Definition at line 340 of file sat_counter.hh.

◆ SatCounter8

Definition at line 337 of file sat_counter.hh.

Function Documentation

◆ calcSaturation()

template<class T >
double gem5::GenericSatCounter< T >::calcSaturation ( ) const
inline

Calculate saturation percentile of the current counter's value with regard to its maximum possible value.

Returns
A value between 0.0 and 1.0 to indicate which percentile of the maximum value the current value is.

Definition at line 303 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter, and gem5::GenericSatCounter< T >::maxVal.

Referenced by gem5::prefetch::SignaturePath::calculateLookaheadConfidence(), gem5::prefetch::IndirectMemory::calculatePrefetch(), gem5::prefetch::Stride::calculatePrefetch(), gem5::prefetch::SignaturePath::calculatePrefetchConfidence(), gem5::DuelingMonitor::DuelingMonitor(), gem5::DuelingMonitor::sample(), TEST(), and TEST_P().

◆ GenericSatCounter() [1/3]

template<class T >
gem5::GenericSatCounter< T >::GenericSatCounter ( const GenericSatCounter< T > & other)
inline

Copy constructor.

Definition at line 92 of file sat_counter.hh.

◆ GenericSatCounter() [2/3]

template<class T >
gem5::GenericSatCounter< T >::GenericSatCounter ( GenericSatCounter< T > && other)
inline

◆ GenericSatCounter() [3/3]

template<class T >
gem5::GenericSatCounter< T >::GenericSatCounter ( unsigned bits,
T initial_val = 0 )
inlineexplicit

Constructor for the counter.

The explicit keyword is used to make sure the user does not assign a number to the counter thinking it will be used as a counter value when it is in fact used as the number of bits.

Parameters
bitsHow many bits the counter will have.
initial_valStarting value for the counter.

Definition at line 77 of file sat_counter.hh.

References gem5::bits(), fatal_if, and gem5::GenericSatCounter< T >::maxVal.

◆ isSaturated()

template<class T >
bool gem5::GenericSatCounter< T >::isSaturated ( ) const
inline

Whether the counter has achieved its maximum value or not.

Returns
True if the counter saturated.

Definition at line 312 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter, and gem5::GenericSatCounter< T >::maxVal.

Referenced by gem5::prefetch::SignaturePathV2::increasePatternEntryCounter(), gem5::compression::FrequentValues::sampleValues(), TEST(), TEST(), and TEST().

◆ operator T()

template<class T >
gem5::GenericSatCounter< T >::operator T ( ) const
inline

Read the counter's value.

Definition at line 285 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter.

◆ operator++() [1/2]

template<class T >
GenericSatCounter & gem5::GenericSatCounter< T >::operator++ ( )
inline

Pre-increment operator.

Definition at line 163 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter, and gem5::GenericSatCounter< T >::maxVal.

◆ operator++() [2/2]

template<class T >
GenericSatCounter gem5::GenericSatCounter< T >::operator++ ( int )
inline

Post-increment operator.

Definition at line 177 of file sat_counter.hh.

◆ operator+=()

template<class T >
GenericSatCounter & gem5::GenericSatCounter< T >::operator+= ( const long long & value)
inline

Add-assignment.

Definition at line 246 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter, and gem5::GenericSatCounter< T >::maxVal.

◆ operator--() [1/2]

template<class T >
GenericSatCounter & gem5::GenericSatCounter< T >::operator-- ( )
inline

Pre-decrement operator.

Definition at line 190 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter.

◆ operator--() [2/2]

template<class T >
GenericSatCounter gem5::GenericSatCounter< T >::operator-- ( int )
inline

Post-decrement operator.

Definition at line 204 of file sat_counter.hh.

◆ operator-=()

template<class T >
GenericSatCounter & gem5::GenericSatCounter< T >::operator-= ( const long long & value)
inline

Subtract-assignment.

Definition at line 266 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter.

◆ operator<<=()

template<class T >
GenericSatCounter & gem5::GenericSatCounter< T >::operator<<= ( const int & shift)
inline

Shift-left-assignment.

Definition at line 229 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter, gem5::GenericSatCounter< T >::maxVal, and gem5::ArmISA::shift.

◆ operator=() [1/2]

template<class T >
GenericSatCounter & gem5::GenericSatCounter< T >::operator= ( const GenericSatCounter< T > & other)
inline

Copy assignment.

Definition at line 103 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::swap().

◆ operator=() [2/2]

template<class T >
GenericSatCounter & gem5::GenericSatCounter< T >::operator= ( GenericSatCounter< T > && other)
inline

◆ operator>>=()

template<class T >
GenericSatCounter & gem5::GenericSatCounter< T >::operator>>= ( const int & shift)
inline

Shift-right-assignment.

Definition at line 217 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter, and gem5::ArmISA::shift.

◆ reset()

◆ saturate()

template<class T >
T gem5::GenericSatCounter< T >::saturate ( )
inline

Saturate the counter.

Returns
The value added to the counter to reach saturation.

Definition at line 321 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter, and gem5::GenericSatCounter< T >::maxVal.

Referenced by gem5::DuelingMonitor::DuelingMonitor(), TEST(), TEST(), and TEST_P().

◆ swap()

template<class T >
void gem5::GenericSatCounter< T >::swap ( GenericSatCounter< T > & other)
inline

Swap the contents of every member of the class.

Used for the default copy-assignment created by the compiler.

Parameters
otherThe other object to swap contents with.

Definition at line 150 of file sat_counter.hh.

References gem5::GenericSatCounter< T >::counter, gem5::GenericSatCounter< T >::initialVal, and gem5::GenericSatCounter< T >::maxVal.

Referenced by gem5::GenericSatCounter< T >::operator=().


Generated on Tue Jun 18 2024 16:24:09 for gem5 by doxygen 1.11.0