Ignore:
Timestamp:
Feb 22, 2017, 3:22:04 PM (2 years ago)
Author:
lindanl
Message:

Provide option to build separated kernels for each regular expression.

File:
1 edited

Legend:

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

    r5320 r5338  
    8686         Gives you colored output + back-referencing capability."), cl::cat(EnhancedGrepOptions));
    8787
     88static cl::opt<bool> MultiGrepKernels("enable-multiGrep-kernels", cl::desc("Construct separated kernels for each regular expression"), cl::cat(EnhancedGrepOptions));
    8889
    8990static std::vector<std::string> allFiles;
     
    112113static std::string allREs;
    113114static re::ModeFlagSet globalFlags = 0;
     115std::vector<re::RE *> REs;
    114116
    115117re::RE * get_icgrep_RE() {
     
    136138    if (CaseInsensitive) globalFlags |= re::CASE_INSENSITIVE_MODE_FLAG;
    137139
    138  
    139     std::vector<re::RE *> REs;
     140
    140141    re::RE * re_ast = nullptr;
    141142    for (unsigned i = 0; i < regexVector.size(); i++) {
     
    371372   
    372373    GrepEngine grepEngine;
    373     grepEngine.grepCodeGen(module_name, re_ast, CountOnly, UTF_16);
     374    if(MultiGrepKernels){
     375        grepEngine.multiGrepCodeGen(module_name, REs, CountOnly, UTF_16);
     376    }
     377    else{
     378        grepEngine.grepCodeGen(module_name, re_ast, CountOnly, UTF_16);
     379    }
    374380
    375381    allFiles = getFullFileList(inputFiles);
Note: See TracChangeset for help on using the changeset viewer.