Ignore:
Timestamp:
Nov 18, 2016, 1:46:55 PM (2 years ago)
Author:
nmedfort
Message:

Merged PabloFunction? and PabloKernel? classes. Updated projects where necessary.

File:
1 edited

Legend:

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

    r5204 r5217  
    2323#include <re/printer_re.h>
    2424#include <pablo/codegenstate.h>
     25#include <pablo/pablo_kernel.h>
    2526#include <UCD/ucd_compiler.hpp>
    2627#include <UCD/resolve_properties.h>
     
    235236    PabloAST * matches = mPB.createAnd(match_follow, mLineBreak, "matches");
    236237    if (mCountOnly) {
    237         Var * const output = mFunction.addResult("matchedLineCount", getScalarTy());
     238        Var * const output = mKernel->addOutput("matchedLineCount", mKernel->getSizeTy());
    238239        PabloBuilder nestedCount = PabloBuilder::Create(mPB);
    239240        mPB.createIf(matches, nestedCount);
    240241        nestedCount.createAssign(output, nestedCount.createCount(matches));
    241242    } else {
    242         Var * const output = mFunction.addResult("output", getStreamTy(1, 2));
     243        Var * const output = mKernel->addOutput("output", mKernel->getStreamSetTy(2));
    243244        mPB.createAssign(mPB.createExtract(output, mPB.getInteger(0)), matches);
    244245        mPB.createAssign(mPB.createExtract(output, mPB.getInteger(1)), mLineBreak);
     
    629630}
    630631
    631 RE_Compiler::RE_Compiler(pablo::PabloFunction & function, cc::CC_Compiler & ccCompiler, bool CountOnly)
    632 : mCountOnly(CountOnly)
     632RE_Compiler::RE_Compiler(PabloKernel * kernel, cc::CC_Compiler & ccCompiler, bool CountOnly)
     633: mKernel(kernel)
     634, mCountOnly(CountOnly)
    633635, mCCCompiler(ccCompiler)
    634636, mLineBreak(nullptr)
     
    641643, mWhileTest(nullptr)
    642644, mStarDepth(0)
    643 , mPB(ccCompiler.getBuilder())
    644 , mFunction(function) {
     645, mPB(ccCompiler.getBuilder()) {
    645646
    646647}
Note: See TracChangeset for help on using the changeset viewer.