Ignore:
Timestamp:
Mar 21, 2017, 11:55:00 AM (2 years ago)
Author:
xuedongx
Message:

Add1 processing rate; pablo Count only up to EOFbit

File:
1 edited

Legend:

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

    r5361 r5370  
    247247    }
    248248    return getScalarField(instance, name + PROCESSED_ITEM_COUNT_SUFFIX);
     249}
     250
     251Value * KernelBuilder::getProducedItemCount(Value * instance, const std::string & name, Value * doFinal) const {
     252    unsigned ssIdx = getStreamSetIndex(name);
     253    if (mStreamSetOutputs[ssIdx].rate.isExact()) {
     254        std::string principalField = mStreamSetInputs.empty() ? mStreamSetOutputs[0].name + PRODUCED_ITEM_COUNT_SUFFIX : mStreamSetInputs[0].name + PROCESSED_ITEM_COUNT_SUFFIX;
     255        Value * principalItemsProcessed = getScalarField(instance, principalField);
     256        return mStreamSetOutputs[ssIdx].rate.CreateRatioCalculation(iBuilder, principalItemsProcessed, doFinal);
     257    }
     258    return getScalarField(instance, name + PRODUCED_ITEM_COUNT_SUFFIX);
    249259}
    250260
Note: See TracChangeset for help on using the changeset viewer.