Ignore:
Timestamp:
Oct 5, 2016, 11:11:51 AM (3 years ago)
Author:
cameron
Message:

Kernels compute and check produced item counts

File:
1 edited

Legend:

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

    r5174 r5183  
    142142    iBuilder->SetInsertPoint(finalPartialBlock);
    143143    iBuilder->CreateCall(doBlockFunction, {self});
     144    /* Adjust the produced item count */
     145    Value * produced = getProducedItemCount(self);
     146    produced = iBuilder->CreateSub(produced, ConstantInt::get(iBuilder->getSizeTy(), iBuilder->getStride()));
     147    setProducedItemCount(self, iBuilder->CreateAdd(produced, remainingBytes));
    144148   
    145149    iBuilder->CreateBr(exitBlock);
     
    170174        iBuilder->CreateBlockAlignedStore(p_bitblock[j], basisBitsBlock_ptr, {iBuilder->getInt32(0), iBuilder->getInt32(j)});
    171175    }
     176    Value * produced = getProducedItemCount(self);
     177    produced = iBuilder->CreateAdd(produced, ConstantInt::get(iBuilder->getSizeTy(), iBuilder->getStride()));
     178    setProducedItemCount(self, produced);   
    172179}
    173180   
Note: See TracChangeset for help on using the changeset viewer.