Ignore:
Timestamp:
Feb 10, 2017, 1:48:34 PM (3 years ago)
Author:
nmedfort
Message:

Adjusted pablo compiler to use getInputStream and getOutputStream when accessing packed stream fields.

File:
1 edited

Legend:

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

    r5299 r5310  
    1919namespace cc {
    2020
    21     CC_Compiler::CC_Compiler(PabloKernel * kernel, const unsigned encodingBits, const std::string prefix)
    22     : mBuilder(kernel->getEntryBlock())
    23     , mEncodingBits(encodingBits)
    24     , mBasisBit(encodingBits) {
     21//    CC_Compiler::CC_Compiler(PabloKernel * kernel, const unsigned encodingBits, const std::string prefix)
     22//    : mBuilder(kernel->getEntryBlock())
     23//    , mEncodingBits(encodingBits)
     24//    , mBasisBit(encodingBits) {
    2525       
    26         // TODO: basisBits should be defined prior and only retrieved here.
    27         Var * const basisBits = kernel->addInput(prefix, kernel->getStreamSetTy(encodingBits));
    28         for (unsigned i = 0; i != mEncodingBits; i++) {
    29             mBasisBit[i] = mBuilder.createExtract(basisBits, mBuilder.getInteger(i)); assert (mBasisBit[i]);
    30         }
    31         mEncodingMask = (static_cast<unsigned>(1) << encodingBits) - static_cast<unsigned>(1);
    32     }
     26//        // TODO: basisBits should be defined prior and only retrieved here.
     27//        Var * const basisBits = kernel->addInput(prefix, kernel->getStreamSetTy(encodingBits));
     28//        for (unsigned i = 0; i != mEncodingBits; i++) {
     29//            mBasisBit[i] = mBuilder.createExtract(basisBits, mBuilder.getInteger(i)); assert (mBasisBit[i]);
     30//        }
     31//        mEncodingMask = (static_cast<unsigned>(1) << encodingBits) - static_cast<unsigned>(1);
     32//    }
    3333   
    3434   
    3535    CC_Compiler::CC_Compiler(pablo::PabloKernel * kernel, pablo::Var * basisBits)
    3636    : mBuilder(kernel->getEntryBlock())
    37     , mEncodingBits(dyn_cast<ArrayType>(basisBits->getType())->getNumElements())
     37    , mEncodingBits(basisBits->getType()->getArrayNumElements())
    3838    , mBasisBit(mEncodingBits) {
    3939        for (unsigned i = 0; i != mEncodingBits; i++) {
Note: See TracChangeset for help on using the changeset viewer.