Ignore:
Timestamp:
Jul 17, 2016, 11:12:34 AM (3 years ago)
Author:
cameron
Message:

Simplify kernel DoBlock? interface

File:
1 edited

Legend:

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

    r5074 r5096  
    133133    Value * self = getParameter(finalBlockFunction, "self");
    134134    Value * remainingBytes = getParameter(finalBlockFunction, "remainingBytes");
    135     Value * byteStreamBlock_ptr = getParameter(finalBlockFunction, "byteStream");
    136     Value * basisBitsBlock_ptr = getParameter(finalBlockFunction, "basisBits");
    137135   
    138136    BasicBlock * finalPartialBlock = BasicBlock::Create(iBuilder->getContext(), "partial", finalBlockFunction, 0);
     
    143141    iBuilder->CreateCondBr(emptyBlockCond, finalEmptyBlock, finalPartialBlock);
    144142    iBuilder->SetInsertPoint(finalPartialBlock);
    145     iBuilder->CreateCall(doBlockFunction, {self, byteStreamBlock_ptr, basisBitsBlock_ptr});
     143    iBuilder->CreateCall(doBlockFunction, {self});
    146144   
    147145    iBuilder->CreateBr(exitBlock);
    148146   
    149147    iBuilder->SetInsertPoint(finalEmptyBlock);
     148    Value * blockNo = getScalarField(self, blockNoScalar);
     149    Value * basisBitsBlock_ptr = getCircularBufferBlockPointer(self, mStreamSetOutputs[0].ssName, blockNo);   
    150150    iBuilder->CreateStore(Constant::getNullValue(basisBitsBlock_ptr->getType()->getPointerElementType()), basisBitsBlock_ptr);
    151151    iBuilder->CreateBr(exitBlock);
     
    165165    iBuilder->SetInsertPoint(BasicBlock::Create(iBuilder->getContext(), "entry", doBlockFunction, 0));
    166166   
    167     Value * byteStreamBlock_ptr = getParameter(doBlockFunction, "byteStream");
    168     Value * basisBitsBlock_ptr = getParameter(doBlockFunction, "basisBits");
     167    Value * self = getParameter(doBlockFunction, "self");
     168
     169    Value * blockNo = getScalarField(self, blockNoScalar);
     170    Value * byteStreamBlock_ptr = getCircularBufferBlockPointer(self, mStreamSetInputs[0].ssName, blockNo);
     171    Value * basisBitsBlock_ptr = getCircularBufferBlockPointer(self, mStreamSetOutputs[0].ssName, blockNo);   
     172   
    169173    Value * s_bytepack[8];
    170174    for (unsigned i = 0; i < 8; i++) {
Note: See TracChangeset for help on using the changeset viewer.