gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
The SatCounter API.

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

Functions

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

Detailed Description

These methods relate to the SatCounter interface.

Typedef Documentation

◆ SatCounter16

typedef GenericSatCounter<uint16_t> SatCounter16

Definition at line 335 of file sat_counter.hh.

◆ SatCounter32

typedef GenericSatCounter<uint32_t> SatCounter32

Definition at line 336 of file sat_counter.hh.

◆ SatCounter64

typedef GenericSatCounter<uint64_t> SatCounter64

Definition at line 337 of file sat_counter.hh.

◆ SatCounter8

typedef GenericSatCounter<uint8_t> SatCounter8

Definition at line 334 of file sat_counter.hh.

Function Documentation

◆ calcSaturation()

template<class T >
double 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 300 of file sat_counter.hh.

Referenced by Prefetcher::SignaturePath::calculateLookaheadConfidence(), Prefetcher::Stride::calculatePrefetch(), Prefetcher::IndirectMemory::calculatePrefetch(), Prefetcher::SignaturePath::calculatePrefetchConfidence(), and TEST().

◆ GenericSatCounter() [1/3]

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

Copy constructor.

Definition at line 89 of file sat_counter.hh.

◆ GenericSatCounter() [2/3]

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

Move constructor.

Definition at line 113 of file sat_counter.hh.

◆ GenericSatCounter() [3/3]

template<class T >
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 74 of file sat_counter.hh.

◆ isSaturated()

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

Whether the counter has achieved its maximum value or not.

Returns
True if the counter saturated.

Definition at line 309 of file sat_counter.hh.

Referenced by Prefetcher::SignaturePathV2::increasePatternEntryCounter(), Compressor::FrequentValues::sampleValues(), and TEST().

◆ operator T()

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

Read the counter's value.

Definition at line 282 of file sat_counter.hh.

◆ operator++() [1/2]

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

Pre-increment operator.

Definition at line 160 of file sat_counter.hh.

◆ operator++() [2/2]

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

Post-increment operator.

Definition at line 174 of file sat_counter.hh.

◆ operator+=()

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

Add-assignment.

Definition at line 243 of file sat_counter.hh.

◆ operator--() [1/2]

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

Pre-decrement operator.

Definition at line 187 of file sat_counter.hh.

◆ operator--() [2/2]

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

Post-decrement operator.

Definition at line 201 of file sat_counter.hh.

◆ operator-=()

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

Subtract-assignment.

Definition at line 263 of file sat_counter.hh.

◆ operator<<=()

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

Shift-left-assignment.

Definition at line 227 of file sat_counter.hh.

◆ operator=() [1/2]

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

Copy assignment.

Definition at line 100 of file sat_counter.hh.

◆ operator=() [2/2]

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

Move assignment.

Definition at line 127 of file sat_counter.hh.

◆ operator>>=()

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

Shift-right-assignment.

Definition at line 214 of file sat_counter.hh.

◆ reset()

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

◆ saturate()

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

Saturate the counter.

Returns
The value added to the counter to reach saturation.

Definition at line 318 of file sat_counter.hh.

Referenced by TEST().

◆ swap()

template<class T >
void 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 147 of file sat_counter.hh.

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


Generated on Tue Jun 22 2021 15:28:34 for gem5 by doxygen 1.8.17