gem5
v20.1.0.0
|
A pattern that compares masked values to a masked portion of a fixed value. More...
#include <dictionary_compressor.hh>
Public Member Functions | |
MaskedValuePattern (const int number, const uint64_t code, const uint64_t metadata_length, const int match_location, const DictionaryEntry bytes, const bool allocate=false) | |
DictionaryEntry | decompress (const DictionaryEntry dict_bytes) const override |
Decompress the pattern. More... | |
Public Member Functions inherited from Compressor::DictionaryCompressor< T >::MaskedPattern< mask > | |
MaskedPattern (const int number, const uint64_t code, const uint64_t metadata_length, const int match_location, const DictionaryEntry bytes, const bool allocate=true) | |
Public Member Functions inherited from Compressor::DictionaryCompressor< T >::Pattern | |
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... | |
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... | |
Static Public Member Functions | |
static bool | isPattern (const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) |
Static Public Member Functions inherited from Compressor::DictionaryCompressor< T >::MaskedPattern< mask > | |
static bool | isPattern (const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) |
Additional Inherited Members | |
Protected Attributes inherited from Compressor::DictionaryCompressor< T >::Pattern | |
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... | |
A pattern that compares masked values to a masked portion of a fixed value.
If all the masked bits match the provided non-dictionary value, there is a pattern match.
For example, assume the mask is 0xFF00 (that is, this pattern matches the MSB), and we are searching for data containing only ones (i.e., the fixed value is 0xFFFF). If the value (V) 0xFF20 is being compressed, this is a match (V & mask == 0xFF00 == 0xFFFF & mask), and 0x20 is added to the list of unmatched bits. If the value (V2) 0x0120 is being compressed, this is not a match ((V2 & mask == 0x0100) != (0xFF00 == 0xFFFF & mask).
value | The value that is being matched against. |
mask | A mask containing the bits that must match the given value. |
Definition at line 130 of file dictionary_compressor.hh.
|
inline |
Definition at line 527 of file dictionary_compressor.hh.
|
inlineoverridevirtual |
Decompress the pattern.
Each pattern has its own way of interpreting its data.
dict_bytes | The bytes in the corresponding matching entry. |
Reimplemented from Compressor::DictionaryCompressor< T >::MaskedPattern< mask >.
Definition at line 551 of file dictionary_compressor.hh.
|
inlinestatic |
Definition at line 539 of file dictionary_compressor.hh.