34#ifndef __MEM_CACHE_COMPRESSORS_REPEATED_QWORDS_HH__
35#define __MEM_CACHE_COMPRESSORS_REPEATED_QWORDS_HH__
47struct RepeatedQwordsCompressorParams;
83 static std::map<int, std::string> pattern_names = {
87 return pattern_names[number];
90 std::unique_ptr<Pattern>
92 const int match_location)
const override
94 return PatternFactory::getPattern(bytes, dict_bytes, match_location);
99 std::unique_ptr<Base::CompressionData>
compress(
104 typedef RepeatedQwordsCompressorParams
Params;
114 : UncompressedPattern(X, 0, 0, match_location, bytes)
124 : LocatedMaskedPattern<0xFFFFFFFFFFFFFFFF, 0>(
M, 1, 0, match_location,
Cycles is a wrapper class for representing cycle counts, i.e.
A pattern that narrows the MaskedPattern by allowing a only single possible dictionary entry to be ma...
A pattern containing the original uncompressed data.
A template version of the dictionary compressor that allows to choose the dictionary size.
std::array< uint8_t, sizeof(T)> DictionaryEntry
Convenience typedef for a dictionary entry.
PatternM(const DictionaryEntry bytes, const int match_location)
PatternX(const DictionaryEntry bytes, const int match_location)
uint64_t getNumPatterns() const override
Trick function to get the number of patterns.
std::unique_ptr< Base::CompressionData > compress(const std::vector< Base::Chunk > &chunks, Cycles &comp_lat, Cycles &decomp_lat) override
Apply the compression process to the cache line.
std::string getName(int number) const override
Get meta-name assigned to the given pattern.
RepeatedQwordsCompressorParams Params
PatternNumber
The patterns proposed in the paper.
~RepeatedQwords()=default
void addToDictionary(DictionaryEntry data) override
std::unique_ptr< Pattern > getPattern(const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) const override
RepeatedQwords(const Params &p)
Factory< PatternM, PatternX > PatternFactory
Convenience factory declaration.
DictionaryCompressor< uint64_t >::DictionaryEntry DictionaryEntry
Definition of a dictionary based cache compressor.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.