gem5  v21.2.1.1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
gem5::compression::DictionaryCompressor< T >::RepeatedValuePattern< RepT > Class Template Reference

A pattern that checks if dictionary entry sized values are solely composed of multiple copies of a single value. More...

#include <dictionary_compressor.hh>

Inheritance diagram for gem5::compression::DictionaryCompressor< T >::RepeatedValuePattern< RepT >:
gem5::compression::DictionaryCompressor< T >::Pattern

Public Member Functions

 RepeatedValuePattern (const int number, const uint64_t code, const uint64_t metadata_length, const int match_location, const DictionaryEntry bytes, const bool allocate=true)
 
DictionaryEntry decompress (const DictionaryEntry dict_bytes) const override
 Decompress the pattern. More...
 
- Public Member Functions inherited from gem5::compression::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...
 
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...
 

Static Public Member Functions

static bool isPattern (const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location)
 

Private Attributes

RepT value
 The repeated value. More...
 

Additional Inherited Members

- Protected Attributes inherited from gem5::compression::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...
 

Detailed Description

template<class T>
template<class RepT>
class gem5::compression::DictionaryCompressor< T >::RepeatedValuePattern< RepT >

A pattern that checks if dictionary entry sized values are solely composed of multiple copies of a single value.

For example, if we are looking for repeated bytes in a 1-byte granularity (RepT is uint8_t), the value 0x3232 would match, however 0x3332 wouldn't.

Template Parameters
RepTThe type of the repeated value, which must fit in a dictionary entry.

Definition at line 140 of file dictionary_compressor.hh.

Constructor & Destructor Documentation

◆ RepeatedValuePattern()

template<class T >
template<class RepT >
gem5::compression::DictionaryCompressor< T >::RepeatedValuePattern< RepT >::RepeatedValuePattern ( const int  number,
const uint64_t  code,
const uint64_t  metadata_length,
const int  match_location,
const DictionaryEntry  bytes,
const bool  allocate = true 
)
inline

Definition at line 622 of file dictionary_compressor.hh.

Member Function Documentation

◆ decompress()

template<class T >
template<class RepT >
DictionaryEntry gem5::compression::DictionaryCompressor< T >::RepeatedValuePattern< RepT >::decompress ( const DictionaryEntry  dict_bytes) const
inlineoverridevirtual

Decompress the pattern.

Each pattern has its own way of interpreting its data.

Parameters
dict_bytesThe bytes in the corresponding matching entry.
Returns
The decompressed pattern.

Implements gem5::compression::DictionaryCompressor< T >::Pattern.

Definition at line 654 of file dictionary_compressor.hh.

References gem5::ArmISA::i, and gem5::compression::DictionaryCompressor< T >::toDictionaryEntry().

◆ isPattern()

template<class T >
template<class RepT >
static bool gem5::compression::DictionaryCompressor< T >::RepeatedValuePattern< RepT >::isPattern ( const DictionaryEntry bytes,
const DictionaryEntry dict_bytes,
const int  match_location 
)
inlinestatic

Member Data Documentation

◆ value

template<class T >
template<class RepT >
RepT gem5::compression::DictionaryCompressor< T >::RepeatedValuePattern< RepT >::value
private

The repeated value.

Definition at line 616 of file dictionary_compressor.hh.


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

Generated on Wed May 4 2022 12:15:03 for gem5 by doxygen 1.8.17