38 #include "debug/CacheComp.hh" 39 #include "params/PerfectCompressor.hh" 42 std::size_t num_entries)
55 std::unique_ptr<BaseCacheCompressor::CompressionData>
60 std::unique_ptr<BaseCacheCompressor::CompressionData> comp_data(
77 static_cast<const CompData*
>(comp_data)->entries;
78 assert(entries.size() == (
blkSize/8));
79 std::copy(entries.begin(), entries.end(),
data);
83 PerfectCompressorParams::create()
Cycles is a wrapper class for representing cycle counts, i.e.
CompData(const uint64_t *data, std::size_t num_entries)
Default constructor that creates a copy of the original data.
std::unique_ptr< CompressionData > compress(const uint64_t *cache_line, Cycles &comp_lat, Cycles &decomp_lat) override
Apply the compression process to the cache line.
const std::size_t blkSize
Uncompressed cache line size (in bytes).
Base cache compressor interface.
PerfectCompressor(const Params *p)
BaseCacheCompressorParams Params
Convenience typedef.
const Cycles compressionLatency
Number of cycles needed to perform compression.
void decompress(const CompressionData *comp_data, uint64_t *data) override
Apply the decompression process to the compressed data.
const Cycles decompressionLatency
Number of cycles needed to perform decompression.
Definition of a perfect compressor, that always manages to compress to its maximum compression ratio...
const int compressedSize
Size to which this compressor always compresses.