gem5  v22.0.0.2
Public Member Functions | List of all members
gem5::compression::encoder::Base Class Referenceabstract

Base class for encoders. More...

#include <base.hh>

Inheritance diagram for gem5::compression::encoder::Base:

Public Member Functions

 Base ()
virtual ~Base ()=default
virtual Code encode (const uint64_t val) const =0
 The function responsible for the generation of the alternative value. More...
virtual uint64_t decode (const uint64_t code) const =0
 Decode a value. More...

Detailed Description

Base class for encoders.

The goal of encoders is to provide an alternative representation to values, ideally shorter than the value. The alternative representation is called a code.

Definition at line 59 of file base.hh.

Constructor & Destructor Documentation

◆ Base()

gem5::compression::encoder::Base::Base ( )

Definition at line 62 of file base.hh.

◆ ~Base()

virtual gem5::compression::encoder::Base::~Base ( )

Member Function Documentation

◆ decode()

virtual uint64_t gem5::compression::encoder::Base::decode ( const uint64_t  code) const
pure virtual

Decode a value.

See also
codeThe encoded value.
The original value.

Implemented in gem5::compression::encoder::Huffman.

◆ encode()

virtual Code gem5::compression::encoder::Base::encode ( const uint64_t  val) const
pure virtual

The function responsible for the generation of the alternative value.

If the size of the returning Code is greater than the maximum undelying type's size (e.g., 64 bits) the encoding results should be discarded.

Thevalue to be encoded.
The encoded value.

Implemented in gem5::compression::encoder::Huffman.

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

Generated on Thu Jul 28 2022 13:33:28 for gem5 by doxygen 1.8.17