Ignore:
Timestamp:
Oct 25, 2017, 4:57:58 PM (18 months ago)
Author:
nmedfort
Message:

First stage of MultiBlockKernel? and pipeline restructuring

File:
1 edited

Legend:

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

    r5540 r5706  
    6464    assert(mSwizzleFactor > 1 && "mDelCountFieldWidth must be less than the block width");
    6565    assert((mPEXTWidth == 64 || mPEXTWidth == 32) && "PEXT width must be 32 or 64");
    66    
    67     mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle0", MaxRatio(1)});
     66
     67    // why, if we have 1 input stream, are there n output swizzle streams rather 1 of n?
     68    mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle0", BoundedRate(0, 1)});
    6869    addScalar(iBuilder->getBitBlockType(), "pendingSwizzleData0");
    6970    for (unsigned i = 1; i < mSwizzleSetCount; i++) {
    7071        mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1),
    71             "outputSwizzle" + std::to_string(i), FixedRatio(1, 1, "outputSwizzle0")});
     72            "outputSwizzle" + std::to_string(i), RateEqualTo("outputSwizzle0")});
    7273        addScalar(iBuilder->getBitBlockType(), "pendingSwizzleData" + std::to_string(i));
    7374    }
     
    564565        assert(mSwizzleFactor > 1 && "fieldWidth must be less than the block width");
    565566        mStreamSetInputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "inputSwizzle0"});
    566         mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle0", MaxRatio(1)});
     567        mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle0", BoundedRate(0, 1)});
    567568        addScalar(iBuilder->getBitBlockType(), "pendingSwizzleData0");
    568569        for (unsigned i = 1; i < mSwizzleSetCount; i++) {
    569570            mStreamSetInputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "inputSwizzle" + std::to_string(i)});
    570             mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle" + std::to_string(i), FixedRatio(1, 1, "outputSwizzle0")});
     571            mStreamSetOutputs.push_back(Binding{iBuilder->getStreamSetTy(mSwizzleFactor, 1), "outputSwizzle" + std::to_string(i), RateEqualTo("outputSwizzle0")});
    571572            addScalar(iBuilder->getBitBlockType(), "pendingSwizzleData" + std::to_string(i));
    572573        }
     
    602603    for (unsigned i = 0; i < mSwizzleFactor; i++) {
    603604        Value * newItemCount = iBuilder->CreateLoad(iBuilder->CreateGEP(countStreamPtr, iBuilder->getInt32(i)));
    604         iBuilder->CallPrintInt("newItemCount", newItemCount);
     605    //iBuilder->CallPrintInt("newItemCount", newItemCount);
    605606        Value * pendingSpace = iBuilder->CreateSub(iBuilder->getSize(mFieldWidth), pendingOffset);
    606607        Value * pendingSpaceFilled = iBuilder->CreateICmpUGE(newItemCount, pendingSpace);
     
    610611        for (unsigned j = 0; j < mSwizzleSetCount; j++) {
    611612            Value * newItems = iBuilder->loadInputStreamBlock("inputSwizzle" + std::to_string(j), iBuilder->getInt32(i));
    612             iBuilder->CallPrintRegister("newItems", newItems);
     613        //iBuilder->CallPrintRegister("newItems", newItems);
    613614            // Combine as many of the new items as possible into the pending group.
    614615            Value * combinedGroup = iBuilder->CreateOr(pendingData[j], iBuilder->CreateShl(newItems, iBuilder->simd_fill(mFieldWidth, pendingOffset)));
Note: See TracChangeset for help on using the changeset viewer.