38#include "debug/CacheComp.hh"
39#include "params/PerfectCompressor.hh"
48 :
Base(
p), compressedSize(8 * blkSize /
p.max_compression_ratio)
52std::unique_ptr<Base::CompressionData>
57 std::unique_ptr<Base::CompressionData> comp_data(
new CompData(chunks));
Cycles is a wrapper class for representing cycle counts, i.e.
Base cache compressor interface.
const Cycles compExtraLatency
Extra latency added to compression due to packaging, shifting or other operations.
void fromChunks(const std::vector< Chunk > &chunks, uint64_t *data) const
This function re-joins the chunks to recreate the original data.
const Cycles decompExtraLatency
Extra latency added to decompression due to packaging, shifting or other operations.
const Cycles compChunksPerCycle
Degree of parallelization of the compression process.
const Cycles decompChunksPerCycle
Degree of parallelization of the decompression process.
void decompress(const CompressionData *comp_data, uint64_t *data) override
Apply the decompression process to the compressed data.
PerfectCompressorParams Params
std::unique_ptr< CompressionData > compress(const std::vector< Chunk > &chunks, Cycles &comp_lat, Cycles &decomp_lat) override
Apply the compression process to the cache line.
const int compressedSize
Size to which this compressor always compresses.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition of a perfect compressor, that always manages to compress to its maximum compression ratio.