Ignore:
Timestamp:
Dec 17, 2018, 12:17:07 PM (7 months ago)
Author:
nmedfort
Message:

Bug fix for kernel state malloc; minor optimization of pipeline state; grep printing bug fix

File:
1 edited

Legend:

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

    r6230 r6241  
    128128    Value * unconsumedBytes = b->CreateSub(readEndInt, readStartInt);
    129129    unconsumedBytes = b->CreateTrunc(unconsumedBytes, b->getSizeTy());
    130 
    131130    Value * const bufferSize = b->CreateRoundUp(b->CreateAdd(unconsumedBytes, PADDING_SIZE), STRIDE_SIZE);
    132131    Value * const buffer = b->CreateAlignedMalloc(bufferSize, b->getCacheAlignment());
    133 
    134132    b->CreateMemCpy(buffer, readStart, unconsumedBytes, 1);
    135133    b->CreateMemZero(b->CreateGEP(buffer, unconsumedBytes), b->CreateSub(bufferSize, unconsumedBytes), 1);
     
    140138    Value * const offsettedBuffer = b->CreateGEP(buffer, diff);
    141139    PointerType * const codeUnitPtrTy = b->getIntNTy(codeUnitWidth)->getPointerTo();
    142     // set the original base address as the buffer address.
    143     //b->setScalarField("buffer", b->CreatePointerCast(base, codeUnitPtrTy));
    144140    b->setScalarField("ancillaryBuffer", b->CreatePointerCast(buffer, codeUnitPtrTy));
    145141    b->setBaseAddress("sourceBuffer", b->CreatePointerCast(offsettedBuffer, codeUnitPtrTy));
    146142    b->setTerminationSignal();
     143
     144
    147145    BasicBlock * const terminationExit = b->GetInsertBlock();
    148146    b->CreateBr(exit);
     
    419417    newProducedItems->addIncoming(nextProducedItems, entry);
    420418    newProducedItems->addIncoming(fileItems, terminationExit);
    421     b->setProducedItemCount("sourceBuffer", newProducedItems);   
     419    b->setProducedItemCount("sourceBuffer", newProducedItems);
    422420}
    423421
Note: See TracChangeset for help on using the changeset viewer.