Changeset 5256


Ignore:
Timestamp:
Jan 12, 2017, 9:58:00 AM (10 months ago)
Author:
cameron
Message:

noTerminate attribute for stdout kernel

Location:
icGREP/icgrep-devel/icgrep
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/array-test.cpp

    r5254 r5256  
    122122    SingleBlockBuffer matches(iBuilder, iBuilder->getStreamSetTy(count, 1));
    123123
    124     MMapSourceKernel mmapK(iBuilder, iBuilder->getStride());
     124    MMapSourceKernel mmapK(iBuilder);
    125125    mmapK.generateKernel({}, {&ByteStream});
    126126    mmapK.setInitialArguments({fileSize});
  • icGREP/icgrep-devel/icgrep/kernels/stdout_kernel.cpp

    r5247 r5256  
    3232   
    3333    iBuilder->SetInsertPoint(BasicBlock::Create(iBuilder->getContext(), "entry", doSegmentFunction, 0));
    34     BasicBlock * setTermination = BasicBlock::Create(iBuilder->getContext(), "setTermination", doSegmentFunction, 0);
    35     BasicBlock * stdOutexit = BasicBlock::Create(iBuilder->getContext(), "stdOutexit", doSegmentFunction, 0);
    3634    Constant * blockItems = iBuilder->getSize(iBuilder->getBitBlockWidth());
    3735    Constant * itemBytes = iBuilder->getSize(mCodeUnitWidth/8);
     
    6664    mStreamSetInputBuffers[0]->setConsumerPos(streamStructPtr, processed);
    6765
    68     Value * endSignal = iBuilder->CreateLoad(mStreamSetInputBuffers[0]->getEndOfInputPtr(streamStructPtr));
    69     Value * inFinalSegment = iBuilder->CreateAnd(endSignal, lessThanFullSegment);
    70    
    71     iBuilder->CreateCondBr(inFinalSegment, setTermination, stdOutexit);
    72     iBuilder->SetInsertPoint(setTermination);
    73 
    74     setTerminationSignal(self);
    75 
    76     iBuilder->CreateBr(stdOutexit);
    77     iBuilder->SetInsertPoint(stdOutexit);
    7866    iBuilder->CreateRetVoid();
    7967    iBuilder->restoreIP(savePoint);
  • icGREP/icgrep-devel/icgrep/kernels/stdout_kernel.h

    r5246 r5256  
    1919    KernelBuilder(iBuilder, "stdout",
    2020                  {Binding{iBuilder->getStreamSetTy(1, codeUnitWidth), "codeUnitBuffer"}}, {}, {}, {}, {}),
    21     mCodeUnitWidth(codeUnitWidth) {}
     21    mCodeUnitWidth(codeUnitWidth) {
     22        setNoTerminateAttribute(true);
     23    }
    2224   
    2325private:
Note: See TracChangeset for help on using the changeset viewer.