Ignore:
Timestamp:
Mar 27, 2017, 9:20:48 PM (2 years ago)
Author:
cameron
Message:

Processing rates can be defined with respect to named stream sets.

File:
1 edited

Legend:

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

    r5362 r5375  
    272272        assert((fieldWidth > 0) && ((fieldWidth & (fieldWidth - 1)) == 0) && "fieldWidth must be a power of 2");
    273273        assert(mSwizzleFactor > 1 && "fieldWidth must be less than the block width");
    274         for (unsigned i = 0; i < mSwizzleSetCount; i++) {
     274        mStreamSetInputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "inputSwizzle0"});
     275        mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle0", MaxRatio(1)});
     276        addScalar(iBuilder->getBitBlockType(), "pendingSwizzleData0");
     277        for (unsigned i = 1; i < mSwizzleSetCount; i++) {
    275278            mStreamSetInputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "inputSwizzle" + std::to_string(i)});
    276             mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle" + std::to_string(i), MaxRatio(1)});
     279            mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle" + std::to_string(i), FixedRatio(1, 1, "outputSwizzle0")});
    277280            addScalar(iBuilder->getBitBlockType(), "pendingSwizzleData" + std::to_string(i));
    278281        }
     
    334337    for (unsigned j = 0; j < mSwizzleSetCount; j++) {
    335338        setScalarField("pendingSwizzleData" + std::to_string(j), pendingData[j]);
    336         setProducedItemCount("outputSwizzle" + std::to_string(j), produced);
    337     }
     339    }
     340    setProducedItemCount("outputSwizzle0", produced);
    338341}
    339342
     
    343346    Value * pendingOffset = getScalarField("pendingOffset");
    344347    Value * produced = iBuilder->CreateAdd(pendingOffset, getProducedItemCount("outputSwizzle0"));
    345     for (unsigned j = 0; j < mSwizzleSetCount; j++) {
    346         setProducedItemCount("outputSwizzle" + std::to_string(j), produced);
    347     }
    348 }
    349 }
     348    setProducedItemCount("outputSwizzle0", produced);
     349}
     350}
Note: See TracChangeset for help on using the changeset viewer.