gem5  v21.0.1.0
Public Member Functions | Private Attributes | List of all members
Compressor::FPC::ZeroRun Class Reference

#include <fpc.hh>

Inheritance diagram for Compressor::FPC::ZeroRun:

Public Member Functions

 ZeroRun (const DictionaryEntry bytes, const int match_location)
 
std::size_t getSizeBits () const override
 
int getRunLength () const
 Get the number of zeros in the run so far. More...
 
void setRunLength (int length)
 Set the number of zeros in the run so far. More...
 
void setRealSize (int size)
 When the real size is set it means that we are adding the main zero run pattern. More...
 

Private Attributes

int _runLength
 Run length so far. More...
 
int _realSize
 A zero run consists of a main ZeroRun pattern, which has a meaningful real size (i.e., different from zero), and X-1 fake (i.e., they are zero-sized, and don't exist in a real implementation) patterns, with X being the size of the zero run. More...
 

Detailed Description

Definition at line 150 of file fpc.hh.

Constructor & Destructor Documentation

◆ ZeroRun()

Compressor::FPC::ZeroRun::ZeroRun ( const DictionaryEntry  bytes,
const int  match_location 
)
inline

Definition at line 165 of file fpc.hh.

Member Function Documentation

◆ getRunLength()

int Compressor::FPC::ZeroRun::getRunLength ( ) const
inline

Get the number of zeros in the run so far.

Returns
The number of zeros in this run.

Definition at line 183 of file fpc.hh.

References _runLength.

◆ getSizeBits()

std::size_t Compressor::FPC::ZeroRun::getSizeBits ( ) const
inlineoverride

Definition at line 173 of file fpc.hh.

References _realSize.

◆ setRealSize()

void Compressor::FPC::ZeroRun::setRealSize ( int  size)
inline

When the real size is set it means that we are adding the main zero run pattern.

When that happens, the metadata length must also be taken into account for the size calculation.

Parameters
sizeNumber of bits used to represent the number of zeros in the run.

Definition at line 200 of file fpc.hh.

References _realSize.

◆ setRunLength()

void Compressor::FPC::ZeroRun::setRunLength ( int  length)
inline

Set the number of zeros in the run so far.

Parameters
Thenumber of zeros in this run.

Definition at line 190 of file fpc.hh.

References _runLength.

Member Data Documentation

◆ _realSize

int Compressor::FPC::ZeroRun::_realSize
private

A zero run consists of a main ZeroRun pattern, which has a meaningful real size (i.e., different from zero), and X-1 fake (i.e., they are zero-sized, and don't exist in a real implementation) patterns, with X being the size of the zero run.

Definition at line 162 of file fpc.hh.

Referenced by getSizeBits(), and setRealSize().

◆ _runLength

int Compressor::FPC::ZeroRun::_runLength
private

Run length so far.

Definition at line 154 of file fpc.hh.

Referenced by getRunLength(), and setRunLength().


The documentation for this class was generated from the following file:

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