Searched defs:BaseCacheCompressor (Results 1 - 4 of 4) sorted by relevance

/gem5/src/mem/cache/compressors/
H A Dbase.hh54 class BaseCacheCompressor : public SimObject { class in inherits:SimObject
H A DCompressors.py33 class BaseCacheCompressor(SimObject): class in inherits:SimObject
H A Dbase.cc75 BaseCacheCompressor::BaseCacheCompressor(const Params *p) function in class:BaseCacheCompressor
[all...]
H A Dbdi.cc281 assert(delta_index < deltas.size()); const TD delta = deltas[delta_index]; const int base_index = bitMask[delta_index]; assert(base_index < bases.size()); const TB base = bases[base_index]; value <<= base_size_bits; value |= static_cast<uint64_t>((base + delta) & mask); } return value; } BDI::BDI(const Params *p) : BaseCacheCompressor(p), useMoreCompressors(p->use_more_compressors), qwordsPerCacheLine(blkSize/BYTES_PER_QWORD) { static_assert(sizeof(ENCODING_NAMES)/sizeof(char*) == NUM_ENCODINGS, �); } bool BDI::isZeroPackable(const uint64_t* data) const { return std::all_of(data, data + qwordsPerCacheLine, [](const uint64_t entry){ return entry == 0; }); } bool BDI::isSameValuePackable(const uint64_t* data) const { const uint64_t rep_value = data[0]; return std::all_of(data, data + qwordsPerCacheLine, [rep_value](const uint64_t entry) {return entry == rep_value;}); } template <class TB, class TD> std::unique_ptr<BDI::BDICompData> BDI::tryCompress(const uint64_t* data, const uint8_t encoding) const { auto temp_data = std::unique_ptr<BDICompDataBaseDelta<TB, TD>>( new BDICompDataBaseDelta<TB, TD>(encoding, blkSize)); if (temp_data->compress(data, blkSize)) { return std::move(temp_data); } else { return std::unique_ptr<BDICompData>{}; } } void BDI::decompress(const BaseCacheCompressor::CompressionData* comp_data, uint64_t* data) { for (std::size_t i = 0; i < qwordsPerCacheLine; i++) data[i] = static_cast<const BDICompData*>(comp_data)->access(i); } std::unique_ptr<BaseCacheCompressor::CompressionData> BDI::compress(const uint64_t* data, Cycles& comp_lat, Cycles& decomp_lat) { std::unique_ptr<BDICompData> bdi_data; if (isZeroPackable(data)) { bdi_data = std::unique_ptr<BDICompData>(new BDICompDataZeros()); comp_lat = Cycles(qwordsPerCacheLine); } else if (isSameValuePackable(data)) { bdi_data = std::unique_ptr<BDICompData>(new BDICompDataRep(data[0])); comp_lat = Cycles(qwordsPerCacheLine); } else { bdi_data = std::unique_ptr<BDICompData>( new BDICompDataUncompressed(data, blkSize)); int base_delta_ratio = 2; for (int ratio = 8; ratio >= base_delta_ratio; ratio/=2) { for (int base_size = 8; base_size >= ratio; base_size/=2) argument

Completed in 7 milliseconds