|
gem5
v21.0.1.0
|
The compressed data is composed of multiple pattern entries. More...
#include <dictionary_compressor.hh>
Public Member Functions | |
| Pattern (const int number, const uint64_t code, const uint64_t metadata_length, const uint64_t num_unmatched_bits, const int match_location, const bool allocate=true) | |
| Default constructor. More... | |
| virtual | ~Pattern ()=default |
| Default destructor. More... | |
| int | getPatternNumber () const |
| Get enum number associated to this pattern. More... | |
| uint8_t | getCode () const |
| Get code of this pattern. More... | |
| uint8_t | getMatchLocation () const |
| Get the index of the dictionary match location. More... | |
| virtual std::size_t | getSizeBits () const |
| Get size, in bits, of the pattern (excluding prefix). More... | |
| bool | shouldAllocate () const |
| Determine if pattern allocates a dictionary entry. More... | |
| std::string | print () const |
| Extract pattern's information to a string. More... | |
| virtual DictionaryEntry | decompress (const DictionaryEntry dict_bytes) const =0 |
| Decompress the pattern. More... | |
Protected Attributes | |
| const int | patternNumber |
| Pattern enum number. More... | |
| const uint8_t | code |
| Code associated to the pattern. More... | |
| const uint8_t | length |
| Length, in bits, of the code and match location. More... | |
| const uint8_t | numUnmatchedBits |
| Number of unmatched bits. More... | |
| const int | matchLocation |
| Index representing the the match location. More... | |
| const bool | allocate |
| Wether the pattern allocates a dictionary entry or not. More... | |
The compressed data is composed of multiple pattern entries.
To add a new pattern one should inherit from this class and implement isPattern() and decompress(). Then the new pattern must be added to the PatternFactory declaration in crescent order of size (in the DictionaryCompressor class).
Definition at line 281 of file dictionary_compressor.hh.
|
inline |
Default constructor.
| number | Pattern number. |
| code | Code associated to this pattern. |
| metadata_length | Length, in bits, of the code and match location. |
| num_unmatched_bits | Number of unmatched bits. |
| match_location | Index of the match location. |
Definition at line 312 of file dictionary_compressor.hh.
|
virtualdefault |
Default destructor.
|
pure virtual |
Decompress the pattern.
Each pattern has its own way of interpreting its data.
| dict_bytes | The bytes in the corresponding matching entry. |
Implemented in Compressor::DictionaryCompressor< T >::SignExtendedPattern< N >, Compressor::DictionaryCompressor< T >::DeltaPattern< DeltaSizeBits >, Compressor::DictionaryCompressor< T >::RepeatedValuePattern< RepT >, Compressor::DictionaryCompressor< T >::MaskedValuePattern< value, mask >, Compressor::DictionaryCompressor< T >::MaskedValuePattern< 0, 0xFFFFFFFFFFFFFFFF >, Compressor::DictionaryCompressor< T >::MaskedPattern< mask >, and Compressor::DictionaryCompressor< T >::UncompressedPattern.
|
inline |
|
inline |
Get the index of the dictionary match location.
Definition at line 343 of file dictionary_compressor.hh.
|
inline |
Get enum number associated to this pattern.
Definition at line 329 of file dictionary_compressor.hh.
|
inlinevirtual |
Get size, in bits, of the pattern (excluding prefix).
Corresponds to unmatched_data_size + code_length.
Definition at line 352 of file dictionary_compressor.hh.
|
inline |
Extract pattern's information to a string.
Definition at line 370 of file dictionary_compressor.hh.
References csprintf().
|
inline |
Determine if pattern allocates a dictionary entry.
Definition at line 362 of file dictionary_compressor.hh.
|
protected |
Wether the pattern allocates a dictionary entry or not.
Definition at line 300 of file dictionary_compressor.hh.
|
protected |
Code associated to the pattern.
Definition at line 288 of file dictionary_compressor.hh.
|
protected |
Length, in bits, of the code and match location.
Definition at line 291 of file dictionary_compressor.hh.
|
protected |
Index representing the the match location.
Definition at line 297 of file dictionary_compressor.hh.
|
protected |
Number of unmatched bits.
Definition at line 294 of file dictionary_compressor.hh.
|
protected |
Pattern enum number.
Definition at line 285 of file dictionary_compressor.hh.