34#ifndef __MEM_CACHE_COMPRESSORS_CPACK_HH__
35#define __MEM_CACHE_COMPRESSORS_CPACK_HH__
88 static std::map<int, std::string> patternNames = {
93 return patternNames[number];
99 const int match_location)
const override
101 return PatternFactory::getPattern(bytes, dict_bytes, match_location);
125 : MaskedValuePattern<0, 0xFFFFFFFF>(
ZZZZ, 0x0, 2, match_location,
135 : UncompressedPattern(
XXXX, 0x1, 2, match_location, bytes)
144 : MaskedPattern<0xFFFFFFFF>(
MMMM, 0x2, 6, match_location, bytes, true)
153 : MaskedPattern<0xFFFF0000>(
MMXX, 0xC, 8, match_location, bytes, true)
162 : MaskedValuePattern<0, 0xFFFFFF00>(
ZZZX, 0xD, 4, match_location,
172 : MaskedPattern<0xFFFFFF00>(
MMMX, 0xE, 8, match_location, bytes, true)
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
PatternMMMM(const DictionaryEntry bytes, const int match_location)
PatternMMMX(const DictionaryEntry bytes, const int match_location)
PatternMMXX(const DictionaryEntry bytes, const int match_location)
PatternXXXX(const DictionaryEntry bytes, const int match_location)
PatternZZZX(const DictionaryEntry bytes, const int match_location)
PatternZZZZ(const DictionaryEntry bytes, const int match_location)
~CPack()
Default destructor.
PatternNumber
The patterns proposed in the paper.
Factory< PatternZZZZ, PatternMMMM, PatternZZZX, PatternMMMX, PatternMMXX, PatternXXXX > PatternFactory
Convenience factory declaration.
std::unique_ptr< Pattern > getPattern(const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) const override
DictionaryCompressor< uint32_t >::DictionaryEntry DictionaryEntry
CPackParams Params
Convenience typedef.
void addToDictionary(DictionaryEntry data) override
CPack(const Params &p)
Default constructor.
uint64_t getNumPatterns() const override
Trick function to get the number of patterns.
std::string getName(int number) const override
Get meta-name assigned to the given pattern.
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.