Ignore:
Timestamp:
Feb 17, 2018, 9:40:32 AM (19 months ago)
Author:
cameron
Message:

Decoupling CC compilers from Pablo Kernel

Location:
icGREP/icgrep-devel/icgrep/kernels
Files:
6 edited

Legend:

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

    r5847 r5872  
    103103void ParabixCharacterClassKernelBuilder::generatePabloMethod() {
    104104    PabloBuilder pb(getEntryScope());
    105     cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
     105    cc::Parabix_CC_Compiler ccc(getEntryScope(), getInputStreamSet("basis"));
    106106    Var * outputVar = getOutputStreamVar("outputStream");
    107107    for (unsigned i = 0; i < mCharClasses.size(); ++i) {
    108         pb.createAssign(pb.createExtract(outputVar, i), ccc.compileCC("cc", mCharClasses[i], pb));
     108        pb.createAssign(pb.createExtract(outputVar, i), ccc.compileCC(mCharClasses[i]));
    109109    }
    110110}
  • icGREP/icgrep-devel/icgrep/kernels/charclasses.cpp

    r5861 r5872  
    8080    std::unique_ptr<CC_Compiler> ccc;
    8181    if (mUseDirectCC) {
    82         ccc = make_unique<cc::Direct_CC_Compiler>(this, pb.createExtract(getInput(0), pb.getInteger(0)));
     82        ccc = make_unique<cc::Direct_CC_Compiler>(getEntryScope(), pb.createExtract(getInput(0), pb.getInteger(0)));
    8383    } else {
    84         ccc = make_unique<cc::Parabix_CC_Compiler>(this, getInputStreamSet("basis"));
     84        ccc = make_unique<cc::Parabix_CC_Compiler>(getEntryScope(), getInputStreamSet("basis"));
    8585    }
    8686    unsigned n = mCCs.size();
  • icGREP/icgrep-devel/icgrep/kernels/delmask_kernel.cpp

    r5847 r5872  
    2525    //  output: delmask stream + error stream
    2626   
    27     cc::Parabix_CC_Compiler ccc(this, u8_bits);
     27    cc::Parabix_CC_Compiler ccc(getEntryScope(), u8_bits);
    2828   
    2929    Zeroes * zeroes = main.createZeroes();
     
    3434    Var * error_mask = main.createVar("error_mask", zeroes);
    3535   
    36     PabloAST * ASCII = ccc.compileCC("ASCII", re::makeCC(0x0, 0x7F), main);
    37     auto ascii = main.createScope();
    38     main.createIf(ASCII, ascii);
    39     PabloAST * u8pfx = ccc.compileCC("u8pfx", re::makeCC(0xC0, 0xFF), main);
    40     PabloAST * nonASCII = ccc.compileCC("u8pfx", re::makeCC(0x80, 0xFF), main);
     36    PabloAST * u8pfx = ccc.compileCC(re::makeCC(0xC0, 0xFF));
     37    PabloAST * nonASCII = ccc.compileCC(re::makeCC(0x80, 0xFF));
    4138    auto it = main.createScope();
    4239    main.createIf(nonASCII, it);
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.cpp

    r5867 r5872  
    4242void RequiredStreams_UTF8::generatePabloMethod() {
    4343    PabloBuilder pb(getEntryScope());
    44     cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
     44    cc::Parabix_CC_Compiler ccc(getEntryScope(), getInputStreamSet("basis"));
    4545   
    4646    PabloAST * const LF = pb.createExtract(getInput(1), pb.getInteger(0), "LF");
     
    152152void RequiredStreams_UTF16::generatePabloMethod() {
    153153    PabloBuilder pb(getEntryScope());
    154     cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
     154    cc::Parabix_CC_Compiler ccc(getEntryScope(), getInputStreamSet("basis"));
    155155   
    156156    PabloAST * u16hi_hi_surrogate = ccc.compileCC(makeCC(0xD800, 0xDBFF, &cc::UTF16));    //u16hi_hi_surrogate = [\xD8-\xDB]
     
    224224void ICGrepKernel::generatePabloMethod() {
    225225    PabloBuilder pb(getEntryScope());
    226     cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
     226    cc::Parabix_CC_Compiler ccc(getEntryScope(), getInputStreamSet("basis"));
    227227    RE_Compiler re_compiler(this, ccc);
    228228    for (auto a : mAlphabets) {
  • icGREP/icgrep-devel/icgrep/kernels/linebreak_kernel.cpp

    r5861 r5872  
    3838    std::unique_ptr<CC_Compiler> ccc;
    3939    if (mNumOfStreams == 1) {
    40         ccc = make_unique<cc::Direct_CC_Compiler>(this, pb.createExtract(getInput(0), pb.getInteger(0)));
     40        ccc = make_unique<cc::Direct_CC_Compiler>(getEntryScope(), pb.createExtract(getInput(0), pb.getInteger(0)));
    4141    } else {
    42         ccc = make_unique<cc::Parabix_CC_Compiler>(this, getInputStreamSet("basis"));
     42        ccc = make_unique<cc::Parabix_CC_Compiler>(getEntryScope(), getInputStreamSet("basis"));
    4343    }
    4444    PabloAST * LF = ccc->compileCC("LF", makeByte(0x0A), pb);
     
    5959void LineBreakKernelBuilder::generatePabloMethod() {
    6060    PabloBuilder pb(getEntryScope());
    61     cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
     61    cc::Parabix_CC_Compiler ccc(getEntryScope(), getInputStreamSet("basis"));
    6262
    6363    Integer * const ZERO = pb.getInteger(0);
  • icGREP/icgrep-devel/icgrep/kernels/u8u32_kernel.cpp

    r5847 r5872  
    2525    //  output: 32 u8-indexed streams, + delmask stream + error stream
    2626   
    27     cc::Parabix_CC_Compiler ccc(this, u8_bits);
     27    cc::Parabix_CC_Compiler ccc(getEntryScope(), u8_bits);
    2828   
    2929    Zeroes * zeroes = main.createZeroes();
Note: See TracChangeset for help on using the changeset viewer.