gem5  v20.1.0.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Compressor::DictionaryCompressor< T >::UncompressedPattern Class Reference

A pattern containing the original uncompressed data. More...

#include <dictionary_compressor.hh>

Inheritance diagram for Compressor::DictionaryCompressor< T >::UncompressedPattern:
Compressor::DictionaryCompressor< T >::Pattern Compressor::BaseDelta< BaseType, DeltaSizeBits >::PatternX Compressor::RepeatedQwords::PatternX Compressor::Zero::PatternX

Public Member Functions

 UncompressedPattern (const int number, const uint64_t code, const uint64_t metadata_length, const int match_location, const DictionaryEntry bytes)
 
DictionaryEntry decompress (const DictionaryEntry dict_bytes) const override
 Decompress the pattern. More...
 
- 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)
 

Private Attributes

const DictionaryEntry data
 A copy of the original data. More...
 

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...
 

Detailed Description

template<class T>
class Compressor::DictionaryCompressor< T >::UncompressedPattern

A pattern containing the original uncompressed data.

This should be the worst case of every pattern factory, where if all other patterns fail, an instance of this pattern is created.

Definition at line 410 of file dictionary_compressor.hh.

Constructor & Destructor Documentation

◆ UncompressedPattern()

template<class T >
Compressor::DictionaryCompressor< T >::UncompressedPattern::UncompressedPattern ( const int  number,
const uint64_t  code,
const uint64_t  metadata_length,
const int  match_location,
const DictionaryEntry  bytes 
)
inline

Definition at line 418 of file dictionary_compressor.hh.

Member Function Documentation

◆ decompress()

template<class T >
DictionaryEntry Compressor::DictionaryCompressor< T >::UncompressedPattern::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 Compressor::DictionaryCompressor< T >::Pattern.

Definition at line 438 of file dictionary_compressor.hh.

References data.

◆ isPattern()

template<class T >
static bool Compressor::DictionaryCompressor< T >::UncompressedPattern::isPattern ( const DictionaryEntry bytes,
const DictionaryEntry dict_bytes,
const int  match_location 
)
inlinestatic

Definition at line 430 of file dictionary_compressor.hh.

Member Data Documentation

◆ data

template<class T >
const DictionaryEntry Compressor::DictionaryCompressor< T >::UncompressedPattern::data
private

A copy of the original data.

Definition at line 415 of file dictionary_compressor.hh.


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

Generated on Wed Sep 30 2020 14:02:39 for gem5 by doxygen 1.8.17