Searched refs:BDICompDataBaseDelta (Results 1 - 2 of 2) sorted by relevance

/gem5/src/mem/cache/compressors/
H A Dbdi.cc148 BDI::BDICompDataBaseDelta<TB, TD>::BDICompDataBaseDelta(const uint8_t encoding, function in class:BDI::BDICompDataBaseDelta
163 BDI::BDICompDataBaseDelta<TB, TD>::calculateCompressedSize()
183 BDI::BDICompDataBaseDelta<TB, TD>::addBase(const TB base)
201 BDI::BDICompDataBaseDelta<TB, TD>::addDelta(const std::size_t base_index,
212 BDI::BDICompDataBaseDelta<TB, TD>::compress(const uint64_t* data,
260 BDI::BDICompDataBaseDelta<TB, TD>::access(const int index) const
325 auto temp_data = std::unique_ptr<BDICompDataBaseDelta<TB, TD>>(
326 new BDICompDataBaseDelta<TB, TD>(encoding, blkSize));
281 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
H A Dbdi.hh63 template <class TB, class TD> class BDICompDataBaseDelta;
125 * @sa BDICompDataBaseDelta
354 class BDI::BDICompDataBaseDelta : public BDICompData class in class:BDI
407 BDICompDataBaseDelta(const uint8_t encoding, const std::size_t blk_size,

Completed in 6 milliseconds