33 #ifndef __MEM_CACHE_COMPRESSORS_BASE_DELTA_HH__ 34 #define __MEM_CACHE_COMPRESSORS_BASE_DELTA_HH__ 44 struct BaseDictionaryCompressorParams;
45 struct Base64Delta8Params;
46 struct Base64Delta16Params;
47 struct Base64Delta32Params;
48 struct Base32Delta8Params;
49 struct Base32Delta16Params;
50 struct Base16Delta8Params;
62 template <
class BaseType, std::
size_t DeltaSizeBits>
92 Factory<PatternM, PatternX>;
94 std::unique_ptr<typename DictionaryCompressor<BaseType>::Pattern>
97 const int match_location)
const override 99 return PatternFactory::getPattern(bytes, dict_bytes, match_location);
105 static std::map<int, std::string> pattern_names = {
109 return pattern_names[number];
116 std::unique_ptr<BaseCacheCompressor::CompressionData>
118 Cycles& decomp_lat)
override;
121 typedef BaseDictionaryCompressorParams
Params;
126 template <
class BaseType, std::
size_t DeltaSizeBits>
136 match_location, bytes)
141 template <
class BaseType, std::
size_t DeltaSizeBits>
204 #endif //__MEM_CACHE_COMPRESSORS_BASE_DELTA_HH__ BaseDictionaryCompressorParams Params
uint64_t getNumPatterns() const override
Trick function to get the number of patterns.
Cycles is a wrapper class for representing cycle counts, i.e.
PatternNumber
The patterns proposed in the paper.
PatternM(const DictionaryEntry bytes, const int match_location)
Overload hash function for BasicBlockRange type.
Base32Delta8Params Params
void addToDictionary(DictionaryEntry data) override
PatternX(const DictionaryEntry bytes, const int match_location)
Base32Delta16Params Params
Base16Delta8Params Params
std::unique_ptr< typename DictionaryCompressor< BaseType >::Pattern > getPattern(const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) const override
typename DictionaryCompressor< uint64_t >::template Factory< PatternM, PatternX > PatternFactory
Convenience factory declaration.
BaseDelta(const Params *p)
Base64Delta32Params Params
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.
static constexpr int DEFAULT_MAX_NUM_BASES
Definition of a dictionary based cache compressor.
Base64Delta16Params Params
void resetDictionary() override
Clear all dictionary entries.
Base64Delta8Params Params
typename DictionaryCompressor< uint64_t >::DictionaryEntry DictionaryEntry
Base class for all base-delta-immediate compressors.
A template version of the dictionary compressor that allows to choose the dictionary size...