33#ifndef __MEM_CACHE_COMPRESSORS_BASE_DELTA_HH__
34#define __MEM_CACHE_COMPRESSORS_BASE_DELTA_HH__
47struct BaseDictionaryCompressorParams;
48struct Base64Delta8Params;
49struct Base64Delta16Params;
50struct Base64Delta32Params;
51struct Base32Delta8Params;
52struct Base32Delta16Params;
53struct Base16Delta8Params;
68template <
class BaseType, std::
size_t DeltaSizeBits>
99 Factory<PatternM, PatternX>;
101 std::unique_ptr<typename DictionaryCompressor<BaseType>::Pattern>
104 const int match_location)
const override
106 return PatternFactory::getPattern(bytes, dict_bytes, match_location);
112 static std::map<int, std::string> pattern_names = {
116 return pattern_names[number];
123 std::unique_ptr<Base::CompressionData>
compress(
128 typedef BaseDictionaryCompressorParams
Params;
133template <
class BaseType, std::
size_t DeltaSizeBits>
143 match_location, bytes)
148template <
class BaseType, std::
size_t DeltaSizeBits>
Cycles is a wrapper class for representing cycle counts, i.e.
Base16Delta8(const Params &p)
Base16Delta8Params Params
Base32Delta16(const Params &p)
Base32Delta16Params Params
Base32Delta8(const Params &p)
Base32Delta8Params Params
Base64Delta16Params Params
Base64Delta16(const Params &p)
Base64Delta32(const Params &p)
Base64Delta32Params Params
Base64Delta8(const Params &p)
Base64Delta8Params Params
PatternM(const DictionaryEntry bytes, const int match_location)
PatternX(const DictionaryEntry bytes, const int match_location)
Base class for all base-delta-immediate compressors.
BaseDelta(const Params &p)
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.
void addToDictionary(DictionaryEntry data) override
void resetDictionary() override
Clear all dictionary entries.
std::string getName(int number) const override
Get meta-name assigned to the given pattern.
typename DictionaryCompressor< BaseType >::DictionaryEntry DictionaryEntry
typename DictionaryCompressor< BaseType >::template Factory< PatternM, PatternX > PatternFactory
Convenience factory declaration.
PatternNumber
The patterns proposed in the paper.
static constexpr int DEFAULT_MAX_NUM_BASES
uint64_t getNumPatterns() const override
Trick function to get the number of patterns.
std::unique_ptr< typename DictionaryCompressor< BaseType >::Pattern > getPattern(const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) const override
BaseDictionaryCompressorParams Params
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.
Definition of a dictionary based cache compressor.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Overload hash function for BasicBlockRange type.