Ignore:
Timestamp:
Jan 16, 2017, 9:55:26 AM (9 months ago)
Author:
cameron
Message:

Move responsibility for ProducedItemCount? into doSegment unless overridden

File:
1 edited

Legend:

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

    r5260 r5261  
    147147    iBuilder->SetInsertPoint(finalPartialBlock);
    148148    iBuilder->CreateCall(doBlockFunction, {self});
    149     /* Adjust the produced item count */
    150     Value * produced = getProducedItemCount(self, "basisBits");
    151     produced = iBuilder->CreateSub(produced, iBuilder->getSize(iBuilder->getStride()));
    152     setProducedItemCount(self, "basisBits", iBuilder->CreateAdd(produced, remainingBytes));
    153149   
    154150    iBuilder->CreateBr(exitBlock);
     
    177173        iBuilder->CreateBlockAlignedStore(basisbits[i], basisBits);
    178174    }
    179     Value * produced = getProducedItemCount(self, "basisBits");
    180     produced = iBuilder->CreateAdd(produced, iBuilder->getSize(iBuilder->getStride()));
    181     setProducedItemCount(self, "basisBits", produced);   
    182175}
    183176   
     
    201194: KernelBuilder(builder, "s2p", {Binding{builder->getStreamSetTy(1, 8), "byteStream"}}, {Binding{builder->getStreamSetTy(8, 1), "basisBits"}}, {}, {}, {}) {
    202195    setNoTerminateAttribute(true);
    203 
    204 }
    205 
    206 }
     196    setDoBlockUpdatesProducedItemCountsAttribute(false);
     197
     198}
     199
     200}
Note: See TracChangeset for help on using the changeset viewer.