Ignore:
Timestamp:
Jan 29, 2018, 1:08:42 PM (20 months ago)
Author:
cameron
Message:

Unify Parabix CC compiler and Direct CC compiler with a common superclass

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

Legend:

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

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

    r5843 r5847  
    7575    PabloBuilder pb(getEntryScope());
    7676
    77     CC_Compiler ccc(this, getInputStreamSet("basis"));
     77    Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
    7878    unsigned n = mCCs.size();
    7979
  • icGREP/icgrep-devel/icgrep/kernels/delmask_kernel.cpp

    r5843 r5847  
    2525    //  output: delmask stream + error stream
    2626   
    27     cc::CC_Compiler ccc(this, u8_bits);
     27    cc::Parabix_CC_Compiler ccc(this, u8_bits);
    2828   
    2929    Zeroes * zeroes = main.createZeroes();
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.cpp

    r5843 r5847  
    4242void RequiredStreams_UTF8::generatePabloMethod() {
    4343    PabloBuilder pb(getEntryScope());
    44     cc::CC_Compiler ccc(this, getInputStreamSet("basis"));
     44    cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
    4545    Zeroes * const ZEROES = pb.createZeroes();
    4646    PabloAST * const u8pfx = ccc.compileCC(makeByte(0xC0, 0xFF));
     
    135135void RequiredStreams_UTF16::generatePabloMethod() {
    136136    PabloBuilder pb(getEntryScope());
    137     cc::CC_Compiler ccc(this, getInputStreamSet("basis"));
     137    cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
    138138   
    139139    PabloAST * u16hi_hi_surrogate = ccc.compileCC(makeCC(0xD800, 0xDBFF, &cc::UTF16));    //u16hi_hi_surrogate = [\xD8-\xDB]
     
    208208void ICGrepKernel::generatePabloMethod() {
    209209    PabloBuilder pb(getEntryScope());
    210     cc::CC_Compiler cc_compiler(this, getInputStreamSet("basis"));
    211     RE_Compiler re_compiler(this, cc_compiler);
     210    cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
     211    RE_Compiler re_compiler(this, ccc);
    212212    for (auto a : mAlphabets) {
    213213        auto mpx_basis = getInputStreamSet(a->getName() + "_basis");
  • icGREP/icgrep-devel/icgrep/kernels/linebreak_kernel.cpp

    r5843 r5847  
    3838    PabloBuilder pb(getEntryScope());
    3939    #ifdef USE_DIRECT_LF_BUILDER
    40     PabloAST * LF = compileCCfromCodeUnitStream(makeByte(0x0A), getInput(0), pb);
     40    cc::Direct_CC_Compiler ccc(this, pb.createExtract(getInputStreamVar("byteStream"), pb.getInteger(0)));
    4141    #else
    42     cc::CC_Compiler ccc(this, getInputStreamSet("basis"));
     42    cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
     43    #endif
    4344    PabloAST * LF = ccc.compileCC("LF", makeByte(0x0A), pb);
    44     #endif
    4545    pb.createAssign(pb.createExtract(getOutput(0), 0), LF);
    4646}
     
    5959void LineBreakKernelBuilder::generatePabloMethod() {
    6060    PabloBuilder pb(getEntryScope());
    61     cc::CC_Compiler ccc(this, getInputStreamSet("basis"));
     61    cc::Parabix_CC_Compiler ccc(this, getInputStreamSet("basis"));
    6262
    6363    Integer * const ZERO = pb.getInteger(0);
  • icGREP/icgrep-devel/icgrep/kernels/u8u32_kernel.cpp

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