Ignore:
Timestamp:
Mar 21, 2017, 11:55:00 AM (2 years ago)
Author:
xuedongx
Message:

Add1 processing rate; pablo Count only up to EOFbit

File:
1 edited

Legend:

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

    r5366 r5370  
    2828, std::string linebreak
    2929, unsigned basisBitsCount)
    30 : PabloKernel(iBuilder, linebreak +"_kernel", {Binding{iBuilder->getStreamSetTy(basisBitsCount), "basis"}}) {
     30: PabloKernel(iBuilder, linebreak +"_kernel", {Binding{iBuilder->getStreamSetTy(basisBitsCount), "basis"}}, {Binding{iBuilder->getStreamSetTy(1), "linebreak", Add1()}}) {
    3131
    3232    CC_Compiler ccc(this, getInput(0));
    3333    auto & builder = ccc.getBuilder();
    3434   
     35    PabloAST * LineBreak = nullptr;
    3536    PabloAST * LF = ccc.compileCC("LF", makeCC(0x0A), builder);
    3637    PabloAST * CR = ccc.compileCC(makeCC(0x0D));
     
    7576    PabloAST * lb = UNICODE_LINE_BREAK ? UnicodeLineBreak : LF;
    7677    PabloAST * unterminatedLineAtEOF = builder.createAtEOF(builder.createAdvance(builder.createNot(LB_chars), 1));
    77     PabloAST * LineBreak = builder.createOr(lb, unterminatedLineAtEOF);
    78     Var * const r = addOutput("linebreak", getStreamTy());
     78    LineBreak = builder.createOr(lb, unterminatedLineAtEOF);
     79    PabloAST * const r = builder.createExtract(getOutput(0), builder.getInteger(0));
    7980    builder.createAssign(r, LineBreak);
    8081}
Note: See TracChangeset for help on using the changeset viewer.