Ignore:
Timestamp:
Oct 1, 2016, 12:03:14 PM (3 years ago)
Author:
cameron
Message:

Kernel/pipeline progress: sychronize with logicalSegmentNo

File:
1 edited

Legend:

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

    r5106 r5174  
    157157
    158158   
    159 void s2pKernel::generateDoBlockMethod() {
    160     IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
    161     Module * m = iBuilder->getModule();
    162 
    163     Function * doBlockFunction = m->getFunction(mKernelName + doBlock_suffix);
    164    
    165     iBuilder->SetInsertPoint(BasicBlock::Create(iBuilder->getContext(), "entry", doBlockFunction, 0));
    166    
    167     Value * self = getParameter(doBlockFunction, "self");
    168     Value * blockNo = getScalarField(self, blockNoScalar);
     159void s2pKernel::generateDoBlockLogic(Value * self, Value * blockNo) {
    169160    Value * byteStreamBlock_ptr = getStreamSetBlockPtr(self, "byteStream", blockNo);
    170161    Value * basisBitsBlock_ptr = getStreamSetBlockPtr(self, "basisBits", blockNo);
     
    179170        iBuilder->CreateBlockAlignedStore(p_bitblock[j], basisBitsBlock_ptr, {iBuilder->getInt32(0), iBuilder->getInt32(j)});
    180171    }
     172}
     173   
     174void s2pKernel::generateDoBlockMethod() {
     175    IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
     176    Module * m = iBuilder->getModule();
     177   
     178    Function * doBlockFunction = m->getFunction(mKernelName + doBlock_suffix);
     179   
     180    iBuilder->SetInsertPoint(BasicBlock::Create(iBuilder->getContext(), "entry", doBlockFunction, 0));
     181   
     182    Value * self = getParameter(doBlockFunction, "self");
     183    Value * blockNo = getScalarField(self, blockNoScalar);
     184   
     185    generateDoBlockLogic(self, blockNo);
    181186    iBuilder->CreateRetVoid();
    182187    iBuilder->restoreIP(savePoint);
    183188}
    184 
    185    
    186189}
Note: See TracChangeset for help on using the changeset viewer.