Ignore:
Timestamp:
Sep 21, 2017, 3:10:34 PM (2 years ago)
Author:
nmedfort
Message:

Minor clean up. Bug fix for object cache when the same cached kernel is used twice in a single run. Improvement to RE Minimizer.

File:
1 edited

Legend:

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

    r5585 r5646  
    177177
    178178
    179 ICGrepKernel::ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, RE * const re, bool cc, unsigned cc_size)
     179ICGrepKernel::ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, RE * const re, unsigned numOfCharacterClasses)
    180180: RegularExpressionOptimizer(re)
    181181, PabloKernel(iBuilder,
    182182              "ic" + sha1sum(mSignature),
    183               {Binding{iBuilder->getStreamSetTy(cc ? cc_size : 8), "basis"}, Binding{iBuilder->getStreamSetTy(1, 1), "linebreak"}, Binding{iBuilder->getStreamSetTy(4, 1), "required"}},
     183              {Binding{iBuilder->getStreamSetTy(numOfCharacterClasses), "basis"},
     184               Binding{iBuilder->getStreamSetTy(1, 1), "linebreak"},
     185               Binding{iBuilder->getStreamSetTy(4, 1), "required"}},
     186
    184187              {Binding{iBuilder->getStreamSetTy(1, 1), "matches"}}) {
    185188
     
    191194
    192195void ICGrepKernel::generatePabloMethod() {
    193     re2pablo_compiler(this, mRE);
     196    PabloAST * const match_post = re2pablo_compiler(this, mRE);
     197    PabloBlock * const pb = getEntryBlock();
     198    Var * const output = getOutputStreamVar("matches");
     199    pb->createAssign(pb->createExtract(output, pb->getInteger(0)), match_post);
    194200}
    195201
Note: See TracChangeset for help on using the changeset viewer.