Ignore:
Timestamp:
May 13, 2017, 10:56:14 AM (2 years ago)
Author:
nmedfort
Message:

Bug fix for last check in.

File:
1 edited

Legend:

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

    r5446 r5447  
    276276    const auto f = mKernelMap.find(name);
    277277    if (LLVM_UNLIKELY(f == mKernelMap.end())) {
    278         assert (false);
    279278        report_fatal_error(getName() + " does not contain scalar: " + name);
    280279    }
     
    935934        mStreamSetInputBuffers[i]->createBlockAlignedCopy(kb.get(), nextBufPtr, kb->getStreamSetBufferPtr(mStreamSetInputs[i].name), copyItems2);
    936935
    937         Value * itemAddress = kb->CreatePtrToInt(kb->getRawInputPointer(mStreamSetInputs[i].name, kb->getInt32(0), processedItemCount[i]), intAddressTy);
    938         Value * baseAddress = kb->CreatePtrToInt(inputBlockPtr[i], intAddressTy);
    939         Value * tempAddress = kb->CreateAdd(kb->CreatePtrToInt(tempBufPtr, kb->getSizeTy()), kb->CreateSub(itemAddress, baseAddress));
     936        Value * itemAddress = kb->getRawInputPointer(mStreamSetInputs[i].name, kb->getInt32(0), processedItemCount[i]);
     937        itemAddress = kb->CreatePtrToInt(itemAddress, intAddressTy);
     938
     939        Value * baseAddress = inputBlockPtr[i];
     940        baseAddress = kb->CreatePtrToInt(baseAddress, intAddressTy);
     941
     942
     943        Value * tempAddress = kb->CreateAdd(kb->CreatePtrToInt(tempBufPtr, intAddressTy), kb->CreateSub(itemAddress, baseAddress));
    940944        tempArgs.push_back(kb->CreateIntToPtr(tempAddress, mStreamSetInputBuffers[i]->getPointerType()));
    941945    }
     
    947951        blockItemPos.push_back(kb->CreateAnd(producedItemCount[i], blockBaseMask));
    948952        mStreamSetOutputBuffers[i]->createBlockAlignedCopy(kb.get(), tempBufPtr, outputBlockPtr[i], kb->CreateSub(producedItemCount[i], blockItemPos[i]));
    949         Value * itemAddress = kb->CreatePtrToInt(kb->getRawOutputPointer(mStreamSetInputs[i].name, kb->getInt32(0), producedItemCount[i]), kb->getSizeTy());
     953        Value * itemAddress = kb->CreatePtrToInt(kb->getRawOutputPointer(mStreamSetInputs[i].name, kb->getInt32(0), producedItemCount[i]), intAddressTy);
    950954        Value * outputPtr = kb->getOutputStreamBlockPtr(mStreamSetOutputs[i].name, kb->getInt32(0));
    951955        Value * baseAddress = kb->CreatePtrToInt(outputPtr, intAddressTy);
Note: See TracChangeset for help on using the changeset viewer.