Ignore:
Timestamp:
Sep 28, 2017, 11:47:58 AM (21 months ago)
Author:
cameron
Message:

Multiblock kernel builder support for ExternalBuffer? inputs; clean-up

File:
1 edited

Legend:

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

    r5646 r5650  
    910910        inputBlockPtr[i] = kb->getInputStreamBlockPtr(mStreamSetInputs[i].name, kb->getInt32(0));
    911911        Value * avail = kb->CreateSub(mAvailableItemCount[i], processedItemCount[i]);
    912         Value * linearlyAvail = kb->getLinearlyAccessibleItems(mStreamSetInputs[i].name, processedItemCount[i]);
    913         linearlyAvailItems[i] = kb->CreateSelect(kb->CreateICmpULT(avail, linearlyAvail), avail, linearlyAvail);
     912        linearlyAvailItems[i] = kb->getLinearlyAccessibleItems(mStreamSetInputs[i].name, processedItemCount[i], avail);
    914913        auto & rate = mStreamSetInputs[i].rate;
    915914        if (rate.isUnknownRate()) continue;  // No calculation possible for unknown rates.
     
    10691068            else {
    10701069                Value * neededItems = kb->CreateSub(finalItemCountNeeded[i], blockBasePos);
    1071                 Value * availFromBase = kb->getLinearlyAccessibleItems(mStreamSetInputs[i].name, blockBasePos);
    1072                 Value * allAvail = kb->CreateICmpULE(neededItems, availFromBase);
    1073                 Value * copyItems1 = kb->CreateSelect(allAvail, neededItems, availFromBase);
    1074                 //mStreamSetInputBuffers[i]->createBlockAlignedCopy(kb.get(), tempBufPtr, inputPtr, copyItems1);
     1070                Value * copyItems1 = kb->getLinearlyAccessibleItems(mStreamSetInputs[i].name, blockBasePos, neededItems);
     1071                Value * allAvail = kb->CreateICmpEQ(neededItems, copyItems1);
    10751072                Value * copyBlocks1 = kb->CreateUDivCeil(copyItems1, blockSize);
    10761073                mStreamSetInputBuffers[i]->createBlockCopy(kb.get(), tempBufPtr, inputPtr, copyBlocks1);
Note: See TracChangeset for help on using the changeset viewer.