34 #ifndef __MEM_CACHE_COMPRESSORS_REPEATED_QWORDS_HH__ 35 #define __MEM_CACHE_COMPRESSORS_REPEATED_QWORDS_HH__ 44 struct RepeatedQwordsCompressorParams;
76 static std::map<int, std::string> pattern_names = {
80 return pattern_names[number];
83 std::unique_ptr<Pattern>
85 const int match_location)
const override 87 return PatternFactory::getPattern(bytes, dict_bytes, match_location);
92 std::unique_ptr<BaseCacheCompressor::CompressionData>
compress(
93 const uint64_t* data,
Cycles& comp_lat,
Cycles& decomp_lat)
override;
96 typedef RepeatedQwordsCompressorParams
Params;
116 : LocatedMaskedPattern<0xFFFFFFFFFFFFFFFF, 0>(
M, 1, 0, match_location,
122 #endif //__MEM_CACHE_COMPRESSORS_REPEATED_QWORDS_HH__ std::string getName(int number) const override
Get meta-name assigned to the given pattern.
std::unique_ptr< BaseCacheCompressor::CompressionData > compress(const uint64_t *data, Cycles &comp_lat, Cycles &decomp_lat) override
Apply the compression process to the cache line.
Cycles is a wrapper class for representing cycle counts, i.e.
DictionaryCompressor< uint64_t >::DictionaryEntry DictionaryEntry
PatternX(const DictionaryEntry bytes, const int match_location)
Factory< PatternM, PatternX > PatternFactory
Convenience factory declaration.
void addToDictionary(DictionaryEntry data) override
PatternM(const DictionaryEntry bytes, const int match_location)
RepeatedQwordsCompressor(const Params *p)
~RepeatedQwordsCompressor()=default
A pattern that narrows the MaskedPattern by allowing a only single possible dictionary entry to be ma...
UncompressedPattern(const int number, const uint64_t code, const uint64_t metadata_length, const int match_location, const DictionaryEntry bytes)
Definition of a dictionary based cache compressor.
A pattern containing the original uncompressed data.
uint64_t getNumPatterns() const override
Trick function to get the number of patterns.
PatternNumber
The patterns proposed in the paper.
std::unique_ptr< Pattern > getPattern(const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) const override
A template version of the dictionary compressor that allows to choose the dictionary size...
RepeatedQwordsCompressorParams Params