Ignore:
Timestamp:
Feb 2, 2018, 2:49:08 PM (20 months ago)
Author:
nmedfort
Message:

Revised pipeline structure to better control I/O rates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/grep_engine.cpp

    r5841 r5856  
    151151        REs[i] = regular_expression_passes(REs[i]);
    152152        if (CC_Multiplexing) {
    153             const std::vector<const re::CC *> UnicodeSets = re::collectUnicodeSets(REs[i]);
    154 
     153            const auto UnicodeSets = re::collectUnicodeSets(REs[i]);
    155154            StreamSetBuffer * const MatchResults = mGrepDriver->addBuffer<CircularBuffer>(idb, idb->getStreamSetTy(1, 1), baseBufferSize);
    156155            if (UnicodeSets.size() <= 1) {
     
    166165                kernel::Kernel * ccK = mGrepDriver->addKernelInstance<kernel::CharClassesKernel>(idb, std::move(mpx_basis));
    167166                mGrepDriver->makeKernelCall(ccK, {BasisBits}, {CharClasses});
     167//                kernel::Kernel * ccK = mGrepDriver->addKernelInstance<kernel::CharClassesKernel>(idb, std::move(mpx_basis), true);
     168//                mGrepDriver->makeKernelCall(ccK, {ByteStream}, {CharClasses});
    168169                kernel::Kernel * icgrepK = mGrepDriver->addKernelInstance<kernel::ICGrepKernel>(idb, REs[i], std::vector<cc::Alphabet *>{mpx.get()});
    169170                mGrepDriver->makeKernelCall(icgrepK, {BasisBits, LineBreakStream, CRLFStream, RequiredStreams, CharClasses}, {MatchResults});
     
    219220    Module * M = idb->getModule();
    220221
    221     const auto segmentSize = codegen::SegmentSize;
    222     const auto bufferSegments = codegen::BufferSegments * codegen::ThreadNum;
    223 
    224222    const unsigned encodingBits = 8;
    225223
     
    233231
    234232    StreamSetBuffer * ByteStream = mGrepDriver->addBuffer<SourceBuffer>(idb, idb->getStreamSetTy(1, encodingBits));
    235     kernel::Kernel * sourceK = mGrepDriver->addKernelInstance<kernel::FDSourceKernel>(idb, segmentSize * bufferSegments);
     233    kernel::Kernel * sourceK = mGrepDriver->addKernelInstance<kernel::FDSourceKernel>(idb);
    236234    sourceK->setInitialArguments({fileDescriptor});
    237235    mGrepDriver->makeKernelCall(sourceK, {}, {ByteStream});
     
    315313    Module * M = idb->getModule();
    316314
    317     const auto segmentSize = codegen::SegmentSize;
    318     const auto bufferSegments = codegen::BufferSegments * codegen::ThreadNum;
    319315    const unsigned encodingBits = 8;
    320316
     
    330326
    331327    StreamSetBuffer * ByteStream = mGrepDriver->addBuffer<SourceBuffer>(idb, idb->getStreamSetTy(1, encodingBits));
    332     kernel::Kernel * sourceK = mGrepDriver->addKernelInstance<kernel::FDSourceKernel>(idb, segmentSize * bufferSegments);
     328    kernel::Kernel * sourceK = mGrepDriver->addKernelInstance<kernel::FDSourceKernel>(idb);
    333329    sourceK->setInitialArguments({fileDescriptor});
    334330    mGrepDriver->makeKernelCall(sourceK, {}, {ByteStream});
Note: See TracChangeset for help on using the changeset viewer.