Ignore:
Timestamp:
Jan 31, 2017, 4:08:11 PM (2 years ago)
Author:
nmedfort
Message:

Removed 'function' and 'self' parameters from generateXXXMethod() functions.

File:
1 edited

Legend:

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

    r5286 r5292  
    1717namespace kernel {
    1818           
    19 void MMapSourceKernel::generateDoSegmentMethod(Function * doSegmentFunction, Value *self, Value *doFinal, const std::vector<Value *> &producerPos) const {
    20     BasicBlock * setTermination = BasicBlock::Create(iBuilder->getContext(), "setTermination", doSegmentFunction, 0);
    21     BasicBlock * mmapSourceExit = BasicBlock::Create(iBuilder->getContext(), "mmapSourceExit", doSegmentFunction, 0);
     19void MMapSourceKernel::generateDoSegmentMethod(Value *doFinal, const std::vector<Value *> &producerPos) {
     20    BasicBlock * setTermination = CreateBasicBlock("setTermination");
     21    BasicBlock * mmapSourceExit = CreateBasicBlock("mmapSourceExit");
    2222    ConstantInt * segmentItems = iBuilder->getSize(mSegmentBlocks * iBuilder->getBitBlockWidth());
    23     Value * fileItems = getScalarField(self, "fileSize");
     23    Value * fileItems = getScalarField("fileSize");
    2424    if (mCodeUnitWidth > 8) {
    2525        fileItems = iBuilder->CreateUDiv(fileItems, iBuilder->getSize(mCodeUnitWidth / 8));
    2626    }
    27     Value * produced = getProducedItemCount(self, "sourceBuffer");   
     27    Value * produced = getProducedItemCount("sourceBuffer");
    2828    Value * nextProduced = iBuilder->CreateAdd(produced, segmentItems);
    2929    Value * lessThanFullSegment = iBuilder->CreateICmpULT(fileItems, nextProduced);
    3030    produced = iBuilder->CreateSelect(lessThanFullSegment, fileItems, nextProduced);
    31     setProducedItemCount(self, "sourceBuffer", produced);
     31    setProducedItemCount("sourceBuffer", produced);
    3232
    3333    iBuilder->CreateCondBr(lessThanFullSegment, setTermination, mmapSourceExit);
    3434    iBuilder->SetInsertPoint(setTermination);
    35     setTerminationSignal(self);
     35    setTerminationSignal();
    3636    iBuilder->CreateBr(mmapSourceExit);   
    3737
Note: See TracChangeset for help on using the changeset viewer.