Ignore:
Timestamp:
Jan 9, 2018, 2:52:07 PM (15 months ago)
Author:
cameron
Message:

Test case for compileCCfromCodeUnitStream using DirectLineFeedBuilder?

File:
1 edited

Legend:

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

    r5819 r5824  
    9797//
    9898// All engines share a common pipeline to compute a stream of Matches from a given input Bytestream.
     99//#define USE_DIRECT_LF_BUILDER 1
    99100
    100101std::pair<StreamSetBuffer *, StreamSetBuffer *> GrepEngine::grepPipeline(std::vector<re::RE *> & REs, StreamSetBuffer * ByteStream) {
     
    109110
    110111    StreamSetBuffer * LineFeedStream = mGrepDriver->addBuffer<CircularBuffer>(idb, idb->getStreamSetTy(1, 1), segmentSize * bufferSegments);
     112#ifdef USE_DIRECT_LF_BUILDER
     113    kernel::Kernel * linefeedK = mGrepDriver->addKernelInstance<kernel::DirectLineFeedBuilder>(idb);
     114    mGrepDriver->makeKernelCall(linefeedK, {ByteStream}, {LineFeedStream});
     115#else
    111116    kernel::Kernel * linefeedK = mGrepDriver->addKernelInstance<kernel::LineFeedKernelBuilder>(idb, encodingBits);
    112117    mGrepDriver->makeKernelCall(linefeedK, {BasisBits}, {LineFeedStream});
     118#endif
    113119
    114120    StreamSetBuffer * LineBreakStream = mGrepDriver->addBuffer<CircularBuffer>(idb, idb->getStreamSetTy(1, 1), segmentSize * bufferSegments);
     
    122128
    123129    const auto n = REs.size();
    124     std::vector<std::vector<re::CC *>> charclasses(n);
    125130    std::vector<StreamSetBuffer *> MatchResultsBufs(n);
    126131
     
    128133        REs[i] = resolveModesAndExternalSymbols(REs[i]);
    129134        REs[i] = excludeUnicodeLineBreak(REs[i]);
     135        REs[i] = regular_expression_passes(REs[i]);
    130136#define USE_MULTIPLEX_CC
    131137#ifdef USE_MULTIPLEX_CC
    132         REs[i] = regular_expression_passes(REs[i]);
    133138        const std::vector<const re::CC *> UnicodeSets = re::collectUnicodeSets(REs[i]);
    134139        if (UnicodeSets.size() <= 1) {
     
    152157        }
    153158#else
    154         REs[i] = regular_expression_passes(REs[i]);
    155159        StreamSetBuffer * MatchResults = mGrepDriver->addBuffer<CircularBuffer>(idb, idb->getStreamSetTy(1, 1), segmentSize * bufferSegments);
    156160        kernel::Kernel * icgrepK = mGrepDriver->addKernelInstance<kernel::ICGrepKernel>(idb, REs[i]);
Note: See TracChangeset for help on using the changeset viewer.