Ignore:
Timestamp:
Apr 3, 2016, 4:31:22 PM (3 years ago)
Author:
nmedfort
Message:

Redesigned buffer system to allow the pipeline to control selection of the current input and output streams; DoBlock? functions containing lookahead now take multiple input stream arguments. Selection and passing occurs automatically. Some work on Symbol Table.

File:
1 edited

Legend:

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

    r4991 r5000  
    3838
    3939void PipelineBuilder::CreateKernels(PabloFunction * function){
    40     mS2PKernel = new KernelBuilder("s2p", mMod, iBuilder, SegmentSize);
    41     mP2SKernel = new KernelBuilder("p2s", mMod, iBuilder, SegmentSize);
    42     mCaseFoldKernel = new KernelBuilder("casefold", mMod, iBuilder, SegmentSize);
    43     mStdOutKernel = new KernelBuilder("stddout", mMod, iBuilder, SegmentSize);
     40    mS2PKernel = new KernelBuilder(iBuilder, "s2p", SegmentSize);
     41    mP2SKernel = new KernelBuilder(iBuilder, "p2s", SegmentSize);
     42    mCaseFoldKernel = new KernelBuilder(iBuilder, "casefold", SegmentSize);
     43    mStdOutKernel = new KernelBuilder(iBuilder, "stddout", SegmentSize);
    4444
    4545    generateS2PKernel(mMod, iBuilder, mS2PKernel);
     
    6666Function *  PipelineBuilder::ExecuteKernels() {
    6767    Type * const int64ty = iBuilder->getInt64Ty();
    68     Type * const int8PtrTy = iBuilder->getInt8PtrTy();
    6968    Type * const inputType = PointerType::get(ArrayType::get(StructType::get(mMod->getContext(), std::vector<Type *>({ArrayType::get(mBitBlockType, 8)})), 1), 0);
    7069   
     
    9796
    9897    Instance * s2pInstance = mS2PKernel->instantiate(inputStream);
    99     Instance * caseFoldInstance = mCaseFoldKernel->instantiate(s2pInstance->getOutputStreamSet());
    100     Instance * p2sInstance = mP2SKernel->instantiate(caseFoldInstance->getOutputStreamSet());
    101     Instance * stdOutInstance = mStdOutKernel->instantiate(p2sInstance->getOutputStreamSet());
     98    Instance * caseFoldInstance = mCaseFoldKernel->instantiate(s2pInstance->getResultSet());
     99    Instance * p2sInstance = mP2SKernel->instantiate(caseFoldInstance->getResultSet());
     100    Instance * stdOutInstance = mStdOutKernel->instantiate(p2sInstance->getResultSet());
    102101
    103102    stdOutInstance->setInternalState("RemainingBytes", bufferSize);  // The total number of bytes to be sent to stdout.
Note: See TracChangeset for help on using the changeset viewer.