Ignore:
Timestamp:
Jan 7, 2017, 12:26:09 PM (2 years ago)
Author:
cameron
Message:

Separate processedItemCounts and producedItemCounts for each stream set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pablo_kernel.cpp

    r5246 r5247  
    8686    Value * const self = &*(f->arg_begin());
    8787    mPabloCompiler->compile(self, f);
    88     Value * produced = getProducedItemCount(self);
    89     produced = iBuilder->CreateAdd(produced, iBuilder->getSize(iBuilder->getStride()));
    90     setProducedItemCount(self, produced);
     88    for (auto ss : mStreamSetOutputs) {
     89        Value * produced = getProducedItemCount(self, ss.name);
     90        produced = iBuilder->CreateAdd(produced, iBuilder->getSize(iBuilder->getStride()));
     91        setProducedItemCount(self, ss.name, produced);
     92    }
    9193    iBuilder->CreateRetVoid();
    9294    #ifndef NDEBUG
     
    116118    iBuilder->CreateCall(doBlockFunction, doBlockArgs);
    117119    /* Adjust the produced item count */
    118     Value * produced = getProducedItemCount(self);
    119     produced = iBuilder->CreateSub(produced, iBuilder->getSize(iBuilder->getStride()));
    120     setProducedItemCount(self, iBuilder->CreateAdd(produced, remaining));
     120    for (auto ss : mStreamSetOutputs) {
     121        Value * produced = getProducedItemCount(self, ss.name);
     122        produced = iBuilder->CreateSub(produced, iBuilder->getSize(iBuilder->getStride()));
     123        produced = iBuilder->CreateAdd(produced, remaining);
     124        setProducedItemCount(self, ss.name, produced);
     125    }
    121126    iBuilder->CreateRetVoid();
    122127    #ifndef NDEBUG
Note: See TracChangeset for help on using the changeset viewer.