Ignore:
Timestamp:
Dec 3, 2017, 12:40:40 PM (18 months ago)
Author:
nmedfort
Message:

Bug fixes and simplified MultiBlockKernel? logic

File:
1 edited

Legend:

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

    r5706 r5755  
    369369        iBuilder->storeOutputStreamBlock("outputStreamSet", iBuilder->getInt32(j), output);
    370370    }
    371     Value * delCount = partial_sum_popcount(iBuilder, mDeletionFieldWidth, iBuilder->simd_not(delMask));
     371    Value * const delCount = partial_sum_popcount(iBuilder, mDeletionFieldWidth, iBuilder->simd_not(delMask));
    372372    iBuilder->storeOutputStreamBlock("deletionCounts", iBuilder->getInt32(0), iBuilder->bitCast(delCount));
    373373}
    374374
    375 DeletionKernel::DeletionKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned fw, unsigned streamCount)
    376 : BlockOrientedKernel("del" + std::to_string(fw) + "_" + std::to_string(streamCount),
     375DeletionKernel::DeletionKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, const unsigned fieldWidth, const unsigned streamCount)
     376: BlockOrientedKernel("del" + std::to_string(fieldWidth) + "_" + std::to_string(streamCount),
    377377              {Binding{iBuilder->getStreamSetTy(streamCount), "inputStreamSet"},
    378378               Binding{iBuilder->getStreamSetTy(), "delMaskSet"}},
    379379              {Binding{iBuilder->getStreamSetTy(streamCount), "outputStreamSet"},
    380                Binding{iBuilder->getStreamSetTy(), "deletionCounts"}},
     380               Binding{iBuilder->getStreamSetTy(), "deletionCounts", FixedRate(), RoundUpTo(iBuilder->getBitBlockWidth())}},
    381381              {}, {}, {})
    382 , mDeletionFieldWidth(fw)
     382, mDeletionFieldWidth(fieldWidth)
    383383, mStreamCount(streamCount) {
    384384}
     
    626626        pendingOffset = iBuilder->CreateAnd(iBuilder->CreateAdd(newItemCount, pendingOffset), iBuilder->getSize(mFieldWidth-1));
    627627    }
    628     iBuilder->setScalarField("pendingOffset", pendingOffset);
    629     iBuilder->CallPrintInt("pendingOffset", pendingOffset);
    630 
    631    
     628    iBuilder->setScalarField("pendingOffset", pendingOffset);   
    632629    Value * newlyProduced = iBuilder->CreateSub(iBuilder->CreateShl(outputIndex, outputIndexShift), producedOffset);
    633630    Value * produced = iBuilder->CreateAdd(outputProduced, newlyProduced);
Note: See TracChangeset for help on using the changeset viewer.