Ignore:
Timestamp:
Feb 10, 2017, 1:48:34 PM (2 years ago)
Author:
nmedfort
Message:

Adjusted pablo compiler to use getInputStream and getOutputStream when accessing packed stream fields.

Location:
icGREP/icgrep-devel/icgrep/re
Files:
3 edited

Legend:

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

    r5308 r5310  
    4343void RE_Compiler::initializeRequiredStreams(const unsigned encodingBits) {
    4444    if (encodingBits == 8) {
    45       RE_Compiler::initializeRequiredStreams_utf8();
    46     }
    47     else if (encodingBits == 16) {
    48       RE_Compiler::initializeRequiredStreams_utf16();
     45        RE_Compiler::initializeRequiredStreams_utf8();
     46    } else if (encodingBits == 16) {
     47        RE_Compiler::initializeRequiredStreams_utf16();
    4948    }
    5049}
  • icGREP/icgrep-devel/icgrep/re/re_toolchain.cpp

    r5308 r5310  
    8585}
    8686   
    87 void re2pablo_compiler(PabloKernel * kernel, const unsigned encodingBits, RE * re_ast, const bool CountOnly) {
    88     cc::CC_Compiler cc_compiler(kernel, encodingBits);
     87void re2pablo_compiler(PabloKernel * kernel, RE * re_ast, const bool CountOnly) {
     88    Var * const basis = kernel->getInputStreamVar("basis");
     89    cc::CC_Compiler cc_compiler(kernel, basis);
    8990    re::RE_Compiler re_compiler(kernel, cc_compiler, CountOnly);
    90     re_compiler.initializeRequiredStreams(encodingBits);
     91    re_compiler.initializeRequiredStreams(basis->getType()->getArrayNumElements());
    9192    re_compiler.compileUnicodeNames(re_ast);
    9293    re_compiler.finalizeMatchResult(re_compiler.compile(re_ast), AlgorithmOptions.isSet(InvertMatches));
  • icGREP/icgrep-devel/icgrep/re/re_toolchain.h

    r5295 r5310  
    3131RE * regular_expression_passes(RE * re_ast);
    3232
    33 void re2pablo_compiler(pablo::PabloKernel * kernel, const unsigned encodingBits, RE * re_ast, const bool CountOnly = false);
     33void re2pablo_compiler(pablo::PabloKernel * kernel, RE * re_ast, const bool CountOnly = false);
    3434   
    3535}
Note: See TracChangeset for help on using the changeset viewer.