Ignore:
Timestamp:
Jan 21, 2018, 6:57:46 AM (17 months ago)
Author:
cameron
Message:

Decoupling PabloKernels? from CC_compiler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/u8u16.cpp

    r5836 r5842  
    6565
    6666void U8U16Kernel::generatePabloMethod() {
    67 
     67    PabloBuilder main(getEntryScope());
     68    Zeroes * zeroes = main.createZeroes();
     69   
    6870    //  input: 8 basis bit streams
    69 
    7071    const auto u8bitSet = getInputStreamVar("u8bit");
     72    PabloAST * u8_bits[8];
     73    for (int i = 0; i < 8; ++i) {
     74        u8_bits[i] = main.createExtract(u8bitSet, main.getInteger(i));
     75    }
    7176
    7277    //  output: 16 u8-indexed streams, + delmask stream + error stream
    73 
    74     cc::CC_Compiler ccc(this, u8bitSet);
    75 
    76     PabloBuilder & main = ccc.getBuilder();
    77     const auto u8_bits = ccc.getBasisBits();
    78 
    79     Zeroes * zeroes = main.createZeroes();
    80 
    81     // Outputs
    8278    Var * u16_hi[8];
    8379    for (int i = 0; i < 8; ++i) {
     
    8884        u16_lo[i] = main.createVar("u16_lo" + std::to_string(i), zeroes);
    8985    }
     86   
    9087    Var * delmask = main.createVar("delmask", zeroes);
    9188    Var * error_mask = main.createVar("error_mask", zeroes);
     89
     90    cc::CC_Compiler ccc(this, u8bitSet);
    9291
    9392    // The logic for processing non-ASCII bytes will be embedded within an if-hierarchy.
Note: See TracChangeset for help on using the changeset viewer.