gem5  v21.1.0.2
Functions
The SatCounter API.

These methods relate to the SatCounter interface. More...

Functions

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

Referenced by gem5::prefetch::SignaturePath::calculateLookaheadConfidence(), gem5::prefetch::Stride::calculatePrefetch(), gem5::prefetch::IndirectMemory::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

Move constructor.

Definition at line 116 of file sat_counter.hh.

◆ GenericSatCounter() [3/3]

template<class T >
gem5::GenericSatCounter< T >::GenericSatCounter ( unsigned  bits,
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.

◆ 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.

Referenced by gem5::prefetch::SignaturePathV2::increasePatternEntryCounter(), gem5::compression::FrequentValues::sampleValues(), 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.

◆ operator++() [1/2]

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

Pre-increment operator.

Definition at line 163 of file sat_counter.hh.

◆ 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.

◆ operator--() [1/2]

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

Pre-decrement operator.

Definition at line 190 of file sat_counter.hh.

◆ 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.

◆ operator<<=()

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

Shift-left-assignment.

Definition at line 230 of file sat_counter.hh.

◆ 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.

◆ operator=() [2/2]

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

Move assignment.

Definition at line 130 of file sat_counter.hh.

◆ 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.

◆ reset()

template<class T >
void gem5::GenericSatCounter< T >::reset ( )
inline

◆ saturate()

template<class T >
uint8_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.

Referenced by gem5::DuelingMonitor::DuelingMonitor(), 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.

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


Generated on Tue Sep 21 2021 12:27:01 for gem5 by doxygen 1.8.17