35 #ifndef __MEM_CACHE_COMPRESSORS_BASE_DELTA_IMPL_HH__ 36 #define __MEM_CACHE_COMPRESSORS_BASE_DELTA_IMPL_HH__ 38 #include "debug/CacheComp.hh" 42 template <
class BaseType, std::
size_t DeltaSizeBits>
48 template <
class BaseType, std::
size_t DeltaSizeBits>
58 template <
class BaseType, std::
size_t DeltaSizeBits>
68 template <
class BaseType, std::
size_t DeltaSizeBits>
69 std::unique_ptr<BaseCacheCompressor::CompressionData>
73 std::unique_ptr<BaseCacheCompressor::CompressionData> comp_data =
84 DPRINTF(CacheComp,
"Base%dDelta%d compression failed\n",
85 8 *
sizeof(BaseType), DeltaSizeBits);
86 }
else if (diff > 0) {
87 comp_data->setSizeBits(comp_data->getSizeBits() +
88 8 *
sizeof(BaseType) * diff);
103 #endif //__MEM_CACHE_COMPRESSORS_BASE_DELTA_IMPL_HH__
Cycles is a wrapper class for representing cycle counts, i.e.
void addToDictionary(DictionaryEntry data) override
virtual void resetDictionary()
Clear all dictionary entries.
static void setSizeBits(CacheBlk *blk, const std::size_t size_bits)
Set the size of the compressed block, in bits.
BaseDelta(const Params *p)
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
BaseCacheCompressorParams Params
Convenience typedef.
void resetDictionary() override
Clear all dictionary entries.
std::unique_ptr< BaseCacheCompressor::CompressionData > compress(const uint64_t *data)
Apply compression.
Definition of a base delta immediate compressor.
typename DictionaryCompressor< uint64_t >::DictionaryEntry DictionaryEntry
Implementation of a dictionary based cache compressor.
A template version of the dictionary compressor that allows to choose the dictionary size...