Changeset 5844


Ignore:
Timestamp:
Jan 26, 2018, 2:43:53 AM (15 months ago)
Author:
xwa163
Message:

Fix pablo compiling error of ParabixCharacterClassKernelBuilder?

File:
1 edited

Legend:

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

    r5843 r5844  
    77#include <re/re_cc.h>
    88#include <cc/cc_compiler.h>
    9 #include <pablo/builder.hpp>
    109#include <kernels/kernel_builder.h>
    1110
     
    8988}
    9089
    91 inline std::vector<Binding> makeOutputBindings(const std::unique_ptr<kernel::KernelBuilder> & b, const std::vector<CC *> & charClasses) {
    92     std::vector<Binding> bindings;
    93     for (CC * cc : charClasses) {
    94         bindings.emplace_back(Binding(b->getStreamTy(), cc->canonicalName(re::CC_type::ByteClass)));
    95     }
    96     return bindings;
    97 }
    9890
    9991ParabixCharacterClassKernelBuilder::ParabixCharacterClassKernelBuilder (
     
    10395{Binding{b->getStreamSetTy(codeUnitSize), "basis"}}
    10496// stream outputs
    105 , makeOutputBindings(b, charClasses)
     97, {Binding(b->getStreamSetTy((unsigned int)charClasses.size()), "outputStream")}
    10698)
    10799, mCharClasses(charClasses) {
     
    112104    PabloBuilder pb(getEntryScope());
    113105    cc::CC_Compiler ccc(this, getInputStreamSet("basis"));
     106    Var * outputVar = getOutputStreamVar("outputStream");
    114107    for (unsigned i = 0; i < mCharClasses.size(); ++i) {
    115         pb.createAssign(getOutput(i), ccc.compileCC("cc", mCharClasses[i], pb));
     108        pb.createAssign(pb.createExtract(outputVar, i), ccc.compileCC("cc", mCharClasses[i], pb));
    116109    }
    117110}
Note: See TracChangeset for help on using the changeset viewer.