Ignore:
Timestamp:
Mar 5, 2018, 9:01:10 AM (14 months ago)
Author:
cameron
Message:

Fixes for byte/bit kernel; match results

File:
1 edited

Legend:

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

    r5889 r5890  
    148148// output
    149149{Binding{kb->getStreamSetTy(1), "nonFinal", FixedRate()},
    150  Binding{kb->getStreamSetTy(1), "UnicodeLB", FixedRate(), Add1()}}) {
     150 Binding{kb->getStreamSetTy(1), "UnicodeLB", FixedRate()}}) {
    151151
    152152}
     
    308308    cc::Parabix_CC_Compiler ccc(scope1, basis);
    309309    RE_Compiler re_compiler(scope1, ccc);
    310     PabloAST * const matches = re_compiler.compile(mSuffixRE);
     310    PabloAST * const matches = re_compiler.compile(mSuffixRE, prefixMatches);
    311311    Var * const output = getOutputStreamVar("matches");
    312312    pb.createAssign(pb.createExtract(output, pb.getInteger(0)), matches);
     
    322322    PabloAST * notLB = pb.createNot(lineBreaks);
    323323    PabloAST * match_follow = pb.createMatchStar(matchResults, notLB);
     324    PabloAST * unterminatedLineAtEOF = pb.createAtEOF(pb.createAdvance(notLB, 1), "unterminatedLineAtEOF");
    324325    Var * const matchedLines = getOutputStreamVar("matchedLines");
    325     pb.createAssign(pb.createExtract(matchedLines, pb.getInteger(0)), pb.createAnd(match_follow, lineBreaks));
     326    pb.createAssign(pb.createExtract(matchedLines, pb.getInteger(0)), pb.createAnd(match_follow, pb.createOr(lineBreaks, unterminatedLineAtEOF)));
    326327}
    327328
     
    332333,Binding{iBuilder->getStreamSetTy(1), "lineBreaks"}},
    333334// output
    334 {Binding{iBuilder->getStreamSetTy(1), "matchedLines"}}) {
     335{Binding{iBuilder->getStreamSetTy(1), "matchedLines", FixedRate(), Add1()}}) {
    335336
    336337}
Note: See TracChangeset for help on using the changeset viewer.