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

First stage of MultiBlockKernel? and pipeline restructuring

File:
1 edited

Legend:

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

    r5599 r5706  
    3939// of bytes to the actual output stream.
    4040
    41 void expand3_4Kernel::generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & iBuilder) {
     41void expand3_4Kernel::generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & iBuilder, Value * const numOfStrides) {
    4242
    4343    BasicBlock * expand2_3entry = iBuilder->GetInsertBlock();
     
    7171    const unsigned packAlign = iBuilder->getBitBlockWidth()/8;
    7272
    73     Function::arg_iterator args = mCurrentMethod->arg_begin();
    74    
    75     /* self = */ args++;
    76     Value * itemsToDo = &*(args++);
    77     Value * sourceStream = &*(args++);
    78     Value * expandedStream = &*(args);
     73    Value * itemsToDo = mAvailableItemCount[0];
     74
     75    Value * sourceStream = iBuilder->getInputStreamBlockPtr("sourceStream", iBuilder->getInt32(0));
     76    Value * expandedStream = iBuilder->getOutputStreamBlockPtr("expand34Stream", iBuilder->getInt32(0));
    7977
    8078    // The main loop processes 3 packs of data at a time.
     
    132130   
    133131    iBuilder->SetInsertPoint(expand3_4_exit);
    134     }
     132}
    135133
    136134
     
    294292expand3_4Kernel::expand3_4Kernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder)
    295293: MultiBlockKernel("expand3_4",
    296             {Binding{iBuilder->getStreamSetTy(1, 8), "sourceStream"}},
    297             {Binding{iBuilder->getStreamSetTy(1, 8), "expand34Stream", FixedRatio(4,3)}},
     294            {Binding{iBuilder->getStreamSetTy(1, 8), "sourceStream", FixedRate(3)}},
     295            {Binding{iBuilder->getStreamSetTy(1, 8), "expand34Stream", FixedRate(4)}},
    298296            {}, {}, {}) {
    299     setKernelStride(3 * iBuilder->getBitBlockWidth()/8);
     297
    300298}
    301299
     
    310308: BlockOrientedKernel("base64",
    311309            {Binding{iBuilder->getStreamSetTy(1, 8), "radix64stream"}},
    312             {Binding{iBuilder->getStreamSetTy(1, 8), "base64stream", RoundUpToMultiple(4)}},
     310            {Binding{iBuilder->getStreamSetTy(1, 8), "base64stream", FixedRate(1), RoundUpTo(4)}},
    313311            {}, {}, {}) {
    314312}
Note: See TracChangeset for help on using the changeset viewer.