Ignore:
Timestamp:
Sep 2, 2016, 6:01:16 PM (3 years ago)
Author:
cameron
Message:

Bitstream and byte space character class kernels - initial check-in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/cc_compiler.cpp

    r5137 r5140  
    228228    return mBasisBit[mEncodingBits - i - 1];
    229229}
     230   
     231pablo::PabloFunction * ParabixCharacterClassFunction(std::string ccSetName, std::vector<re::CC *> charClasses, unsigned basisBitsCount) {
     232       
     233    pablo::PabloFunction * cc_function = pablo::PabloFunction::Create(ccSetName + "_fn", basisBitsCount, charClasses.size());
     234    CC_Compiler ccc(* cc_function, basisBitsCount);
     235   
     236    pablo::PabloBuilder pBuilder(ccc.getBuilder().getPabloBlock(), ccc.getBuilder());
     237    const std::vector<pablo::Var *> bits = ccc.getBasisBits();
     238   
     239    for (unsigned i = 0; i < charClasses.size(); i++) {
     240        cc_function->setResult(i, ccc.compileCC(charClasses[i]));
     241    }
     242    return cc_function;
     243}
    230244
    231245} // end of namespace cc
Note: See TracChangeset for help on using the changeset viewer.