gem5 v24.0.0.0
|
Base class for encoders. More...
#include <base.hh>
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. | |
virtual uint64_t | decode (const uint64_t code) const =0 |
Decode a value. | |
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.
|
virtualdefault |
|
pure virtual |
Decode a value.
code | The encoded value. |
Implemented in gem5::compression::encoder::Huffman.
|
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.
The | value to be encoded. |
Implemented in gem5::compression::encoder::Huffman.