33 #ifndef __MEM_CACHE_COMPRESSORS_BASE_DELTA_IMPL_HH__ 34 #define __MEM_CACHE_COMPRESSORS_BASE_DELTA_IMPL_HH__ 36 #include "debug/CacheComp.hh" 40 template <
class BaseType, std::
size_t DeltaSizeBits>
46 template <
class BaseType, std::
size_t DeltaSizeBits>
56 template <
class BaseType, std::
size_t DeltaSizeBits>
66 template <
class BaseType, std::
size_t DeltaSizeBits>
67 std::unique_ptr<BaseCacheCompressor::CompressionData>
71 std::unique_ptr<BaseCacheCompressor::CompressionData> comp_data =
82 DPRINTF(CacheComp,
"Base%dDelta%d compression failed\n",
83 8 *
sizeof(BaseType), DeltaSizeBits);
84 }
else if (diff > 0) {
85 comp_data->setSizeBits(comp_data->getSizeBits() +
86 8 *
sizeof(BaseType) * diff);
101 #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...