Ignore:
Timestamp:
Aug 1, 2018, 12:22:09 AM (11 months ago)
Author:
xwa163
Message:
  1. LZ4 ScanMatch? pipeline
  2. Refactor LZ4 Generator
  3. Adjust some naming
File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/lzparabix/LZParabixGenerator.cpp

    r6133 r6137  
    4545    this->generateLoadByteStreamAndBitStream(iBuilder);
    4646
    47     auto decompressedBitStream = this->generateFullBitStreamDecompression(iBuilder);
    48 //    auto decompressedBitStream = this->generateAioBitStreamDecompressoin(iBuilder, {mCompressedBasisBits})[0];
    49 
    50     auto decompressedByteStream = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8), this->getInputBufferBlocks(iBuilder));
     47    auto uncompressedBitStream = this->generateFullBitStreamDecompression(iBuilder);
     48
     49    auto uncompressedByteStream = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8), this->getInputBufferBlocks(iBuilder));
    5150    Kernel * p2sK = mPxDriver.addKernelInstance<P2SKernel>(iBuilder, cc::BitNumbering::BigEndian);
    52     mPxDriver.makeKernelCall(p2sK, {decompressedBitStream}, {decompressedByteStream});
     51    mPxDriver.makeKernelCall(p2sK, {uncompressedBitStream}, {uncompressedByteStream});
    5352
    5453    // --------------------------------------------------------
     
    5655    Kernel * outK = mPxDriver.addKernelInstance<FileSink>(iBuilder, 8);
    5756    outK->setInitialArguments({iBuilder->GetString(outputFile)});
    58     mPxDriver.makeKernelCall(outK, {decompressedByteStream}, {});
     57    mPxDriver.makeKernelCall(outK, {uncompressedByteStream}, {});
    5958
    6059    mPxDriver.generatePipelineIR();
     
    111110    });
    112111
    113     StreamSetBuffer * const decompressionBitStream = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1), this->getDecompressedBufferBlocks(iBuilder));
     112    StreamSetBuffer * const decompressionBitStream = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1),
     113                                                                                       this->getUncompressedBufferBlocks(
     114                                                                                               iBuilder));
    114115
    115116    Kernel * unSwizzleK2 = mPxDriver.addKernelInstance<SwizzleGenerator>(iBuilder, 8, 1, 2);
     
    177178void LZParabixGenerator::generateLoadByteStreamAndBitStream(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) {
    178179    mCompressedByteStream = mPxDriver.addBuffer<ExternalBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8));
    179 //    mCompressedBasisBits = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1), this->getInputBufferBlocks(iBuilder));
     180//    mCompressedBasisBits = mPxDriver.addBuffer<StaticBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1), this->getDefaultBufferBlocks(iBuilder));
    180181
    181182    kernel::Kernel * sourceK = mPxDriver.addKernelInstance<MemorySourceKernel>(iBuilder);
     
    221222    return this->get4MbBufferBlocks() * 2;
    222223}
    223 int LZParabixGenerator::getDecompressedBufferBlocks(const std::unique_ptr<kernel::KernelBuilder> & b) {
     224int LZParabixGenerator::getUncompressedBufferBlocks(const std::unique_ptr<kernel::KernelBuilder> &b) {
    224225    return this->get4MbBufferBlocks() * 2;
    225226}
Note: See TracChangeset for help on using the changeset viewer.