Searched refs:comp_lat (Results 1 - 6 of 6) sorted by relevance
/gem5/src/mem/cache/compressors/ |
H A D | base.hh | 87 * @param comp_lat Compression latency in number of cycles. 92 const uint64_t* cache_line, Cycles& comp_lat, Cycles& decomp_lat) = 0; 122 * @param comp_lat Compression latency in number of cycles. 126 void compress(const uint64_t* data, Cycles& comp_lat,
|
H A D | base.cc | 81 BaseCacheCompressor::compress(const uint64_t* data, Cycles& comp_lat, argument 86 compress(data, comp_lat, decomp_lat); 110 blkSize*8, comp_size_bits, comp_lat, decomp_lat);
|
H A D | bdi.cc | 346 BDI::compress(const uint64_t* data, Cycles& comp_lat, Cycles& decomp_lat) 355 comp_lat = Cycles(qwordsPerCacheLine); 361 comp_lat = Cycles(qwordsPerCacheLine); 437 comp_lat = Cycles(blkSize/base_delta_ratio); 444 comp_lat += Cycles(1); 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 D | cpack.cc | 111 CPack::compress(const uint64_t* data, Cycles& comp_lat, Cycles& decomp_lat) argument 150 comp_lat = Cycles(blkSize/8+5);
|
H A D | bdi.hh | 141 * @param comp_lat Compression latency in number of cycles. 146 const uint64_t* data, Cycles& comp_lat, Cycles& decomp_lat) override;
|
H A D | cpack.hh | 178 * @param comp_lat Compression latency in number of cycles. 183 const uint64_t* data, Cycles& comp_lat, Cycles& decomp_lat) override;
|
Completed in 10 milliseconds