Ignore:
Timestamp:
Apr 7, 2017, 4:59:04 PM (2 years ago)
Author:
nmedfort
Message:

Continued work on processing stdin input. Partial integration of ParabixDriver? methods into icgrep and editd. Object cache does not currently work for recursive REs.

File:
1 edited

Legend:

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

    r5390 r5398  
    4444Value * ProcessingRate::CreateRatioCalculation(IDISA::IDISA_Builder * b, Value * principalInputItems, Value * doFinal) const {
    4545    if (mKind == ProcessingRate::ProcessingRateKind::Fixed || mKind == ProcessingRate::ProcessingRateKind::Max) {
    46         if (ratio_numerator == 1) {
     46        if (mRatioNumerator == 1) {
    4747            return principalInputItems;
    4848        }
    4949        Type * const T = principalInputItems->getType();
    50         Constant * const numerator = ConstantInt::get(T, ratio_numerator);
    51         Constant * const denominator = ConstantInt::get(T, ratio_denominator);
    52         Constant * const denominatorLess1 = ConstantInt::get(T, ratio_denominator - 1);
     50        Constant * const numerator = ConstantInt::get(T, mRatioNumerator);
     51        Constant * const denominator = ConstantInt::get(T, mRatioDenominator);
     52        Constant * const denominatorLess1 = ConstantInt::get(T, mRatioDenominator - 1);
    5353        Value * strmItems = b->CreateMul(principalInputItems, numerator);
    5454        return b->CreateUDiv(b->CreateAdd(denominatorLess1, strmItems), denominator);
     
    5656    if (mKind == ProcessingRate::ProcessingRateKind::RoundUp) {
    5757        Type * const T = principalInputItems->getType();
    58         Constant * const denominator = ConstantInt::get(T, ratio_denominator);
    59         Constant * const denominatorLess1 = ConstantInt::get(T, ratio_denominator - 1);
     58        Constant * const denominator = ConstantInt::get(T, mRatioDenominator);
     59        Constant * const denominatorLess1 = ConstantInt::get(T, mRatioDenominator - 1);
    6060        return b->CreateMul(b->CreateUDiv(b->CreateAdd(principalInputItems, denominatorLess1), denominator), denominator);
    6161    }
     
    9595
    9696    // Create the doSegment function prototype.
    97     std::vector<Type *> doSegmentParameters = {selfType, iBuilder->getInt1Ty()};
     97    std::vector<Type *> params = {selfType, iBuilder->getInt1Ty()};
     98    // const auto count = mStreamSetInputs.size() + mStreamSetOutputs.size();
    9899    for (unsigned i = 0; i < mStreamSetInputs.size(); ++i) {
    99         doSegmentParameters.push_back(iBuilder->getSizeTy());
     100        params.push_back(iBuilder->getSizeTy());
    100101    }
    101     FunctionType * doSegmentType = FunctionType::get(iBuilder->getVoidTy(), doSegmentParameters, false);
     102
     103    FunctionType * doSegmentType = FunctionType::get(iBuilder->getVoidTy(), params, false);
    102104    Function * doSegment = Function::Create(doSegmentType, GlobalValue::ExternalLinkage, getName() + DO_SEGMENT_SUFFIX, client);
    103105    doSegment->setCallingConv(CallingConv::C);
     
    107109    args->setName("self");
    108110    (++args)->setName("doFinal");
    109     for (auto ss : mStreamSetInputs) {
    110         (++args)->setName(ss.name + "_availableItems");
     111    for (const Binding & input : mStreamSetInputs) {
     112        (++args)->setName(input.name + "_availableItems");
    111113    }
     114//    for (const Binding & output : mStreamSetOutputs) {
     115//        (++args)->setName(output.name + "_consumedItems");
     116//    }
    112117
    113118    // Create the accumulator get function prototypes
Note: See TracChangeset for help on using the changeset viewer.