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

Location:
icGREP/icgrep-devel/icgrep/cc
Files:
2 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
  • icGREP/icgrep-devel/icgrep/cc/cc_compiler.h

    r5137 r5140  
    88#define CC_COMPILER_H
    99
     10
    1011#include <re/re_cc.h>
    1112#include <pablo/builder.hpp>
    1213#include <string>
    13 
    1414
    1515namespace pablo {
     
    8787}
    8888
     89pablo::PabloFunction * ParabixCharacterClassFunction(std::string ccSetName, std::vector<re::CC *> charClasses, unsigned basisBitsCount);
     90
    8991
    9092}
Note: See TracChangeset for help on using the changeset viewer.