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

First stage of MultiBlockKernel? and pipeline restructuring

File:
1 edited

Legend:

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

    r5699 r5706  
    1818const unsigned packSize = 64;
    1919   
    20 void UntilNkernel::generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb) {
     20void UntilNkernel::generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb, Value * const numOfStrides) {
    2121/* 
    2222   Strategy:  first form an index consisting of one bit per packsize input positions,
     
    6060    Type * iPackPtrTy = iPackTy->getPointerTo();
    6161   
    62     Function::arg_iterator args = mCurrentMethod->arg_begin();
    63     /* self = */ args++;
    64     Value * itemsToDo = &*(args++);
    65     Value * sourceBitstream = &*(args++);
    66     Value * uptoN_bitstream = &*(args);
    67    
     62//    Function::arg_iterator args = mCurrentMethod->arg_begin();
     63//    /* self = */ args++;
     64//    Value * itemsToDo = &*(args++);
     65//    Value * sourceBitstream = &*(args++);
     66//    Value * uptoN_bitstream = &*(args);
     67   
     68    Value * itemsToDo = mAvailableItemCount[0];
     69    Value * sourceBitstream = kb->getInputStreamBlockPtr("bits", kb->getInt32(0)); // mStreamBufferPtr[0];
     70    Value * uptoN_bitstream = kb->getInputStreamBlockPtr("uptoN", kb->getInt32(0)); // mStreamBufferPtr[1];
     71
    6872    // Compute the ceiling of the number of blocks to do.  If we have a final
    6973    // partial block, it is treated as a full block initially.   
     
    189193UntilNkernel::UntilNkernel(const std::unique_ptr<kernel::KernelBuilder> & kb)
    190194: MultiBlockKernel("UntilN", {Binding{kb->getStreamSetTy(1, 1), "bits"}},
    191                              {Binding{kb->getStreamSetTy(1, 1), "uptoN", MaxRatio(1)}},
     195                             {Binding{kb->getStreamSetTy(1, 1), "uptoN", BoundedRate(0, 1)}},
    192196                             {Binding{kb->getSizeTy(), "N"}}, {},
    193197                             {Binding{kb->getSizeTy(), "seenSoFar"}}) {
Note: See TracChangeset for help on using the changeset viewer.