Changeset 5959 for icGREP


Ignore:
Timestamp:
Apr 10, 2018, 1:34:49 AM (12 months ago)
Author:
xwa163
Message:
  1. Minor bug fixing for availableItemCount in SegmentOriented? lz4_index_builder
  2. Adjust the way to clear output buffer in lz4_index_builder to improve the performance
File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_index_builder.cpp

    r5958 r5959  
    7171        Value * blockDataIndex = iBuilder->getScalarField("blockDataIndex");
    7272
    73         Value * totalNumber = iBuilder->CreateAdd(iBuilder->getAvailableItemCount("blockEnd"), iBuilder->getProcessedItemCount("blockEnd"));
    74         Value * totalExtender = iBuilder->CreateAdd(iBuilder->getAvailableItemCount("extender"), iBuilder->getProcessedItemCount("extender"));
     73        // In MultiblockKernel, availableItemCount + processedItemCount == producedItemCount from previous kernel
     74        // While in SegmentOrigentedKernel, availableItemCount == producedItemCount from previous kernel
     75        Value * totalNumber = iBuilder->getAvailableItemCount("blockEnd");
     76        Value * totalExtender = iBuilder->getAvailableItemCount("extender");
    7577
    7678        Value * blockEnd = this->generateLoadInt64NumberInput(iBuilder, "blockEnd", blockDataIndex);
     
    149151        // TODO Clear Output Buffer at the beginning instead of marking 0
    150152        this->markCircularOutputBitstream(iBuilder, "deletionMarker", iBuilder->getProducedItemCount("deletionMarker"), iBuilder->CreateAdd(phiCursorPosAfterLiteral, iBuilder->getSize(1)), true);
    151         this->markCircularOutputBitstream(iBuilder, "deletionMarker", iBuilder->CreateAdd(phiCursorPosAfterLiteral, iBuilder->getSize(1)), offsetPos, false);
     153//        this->markCircularOutputBitstream(iBuilder, "deletionMarker", iBuilder->CreateAdd(phiCursorPosAfterLiteral, iBuilder->getSize(1)), offsetPos, false);
     154        iBuilder->setProducedItemCount("deletionMarker", offsetPos);
    152155        this->increaseScalarField(iBuilder, "m0OutputPos", literalLength); //TODO m0OutputPos may be removed from scalar fields
    153156        return offsetPos;
     
    238241    void LZ4IndexBuilderKernel::generateProcessCompressedBlock(const std::unique_ptr<KernelBuilder> &iBuilder, Value* blockStart, Value* blockEnd) {
    239242        // Constant
     243        this->markCircularOutputBitstream(iBuilder, "deletionMarker", blockStart, blockEnd, false, false);
     244
    240245        BasicBlock* entryBlock = iBuilder->GetInsertBlock();
    241246
Note: See TracChangeset for help on using the changeset viewer.