Ignore:
Timestamp:
Jan 14, 2018, 1:57:43 AM (14 months ago)
Author:
nmedfort
Message:

UntilN kernel rewritten to use new MultiBlock? system

File:
1 edited

Legend:

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

    r5827 r5830  
    401401}
    402402
    403 Value * KernelBuilder::getInputStreamBlockPtr(const std::string & name, Value * streamIndex) {
    404     Value * const addr = mKernel->getStreamSetInputAddress(name);
    405     if (addr) {
    406         return CreateGEP(addr, {getInt32(0), streamIndex});
    407     } else {
    408         const StreamSetBuffer * const buf = mKernel->getInputStreamSetBuffer(name);
    409         Value * const blockIndex = CreateLShr(getProcessedItemCount(name), std::log2(getBitBlockWidth()));
    410         return buf->getStreamBlockPtr(this, getStreamHandle(name), getBaseAddress(name), streamIndex, blockIndex, true);
    411     }
    412 }
    413 
    414403Value * KernelBuilder::loadInputStreamBlock(const std::string & name, Value * streamIndex) {
    415404    return CreateBlockAlignedLoad(getInputStreamBlockPtr(name, streamIndex));
     
    448437}
    449438
    450 Value * KernelBuilder::getOutputStreamBlockPtr(const std::string & name, Value * streamIndex) {
     439Value * KernelBuilder::getOutputStreamBlockPtr(const std::string & name, Value * streamIndex, Value * const blockOffset) {
    451440    Value * const addr = mKernel->getStreamSetOutputAddress(name);
    452441    if (addr) {
    453         return CreateGEP(addr, {getInt32(0), streamIndex});
     442        return CreateGEP(addr, {blockOffset, streamIndex});
    454443    } else {
    455444        const StreamSetBuffer * const buf = mKernel->getOutputStreamSetBuffer(name);
Note: See TracChangeset for help on using the changeset viewer.