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

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

Location:
icGREP/icgrep-devel/icgrep/editd
Files:
2 edited

Legend:

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

    r5292 r5310  
    190190    PabloBuilder entry(kernel.getEntryBlock());
    191191
    192     Var * pat = kernel.addInput("pat", iBuilder->getStreamSetTy(4));
     192    Var * pat = kernel.getInputStreamVar("pat");
    193193
    194194    PabloAST * basisBits[4];
     
    228228    mmapK.setInitialArguments({fileSize});
    229229   
    230     PabloKernel editdk(iBuilder, "editd");
     230    PabloKernel editdk(iBuilder, "editd",
     231                        {Binding{iBuilder->getStreamSetTy(4), "pat"}},
     232                        {Binding{iBuilder->getStreamSetTy(editDistance + 1), "E"}});
    231233
    232234    buildPatternKernel(editdk, iBuilder, patterns);
     
    259261
    260262void buildPreprocessKernel(PabloKernel & kernel, IDISA::IDISA_Builder * iBuilder) {
    261     cc::CC_Compiler ccc(&kernel);
     263    cc::CC_Compiler ccc(&kernel, kernel.getInputStreamVar("basis"));
     264
    262265    PabloBuilder & pb = ccc.getBuilder();
    263266
     
    267270    PabloAST * G = ccc.compileCC(re::makeCC(re::makeCC(0x47), re::makeCC(0x67)), pb);
    268271
    269     Var * const pat = kernel.addOutput("pat", iBuilder->getStreamSetTy(4));
     272    Var * const pat = kernel.getOutputStreamVar("pat");
    270273
    271274    pb.createAssign(pb.createExtract(pat, 0), A);
     
    307310    std::unique_ptr<Module> s2pM = s2pk.createKernelModule({&ByteStream}, {&BasisBits});
    308311
    309     PabloKernel  ccck(iBuilder, "ccc");
     312    PabloKernel ccck(iBuilder, "ccc",
     313                {{iBuilder->getStreamSetTy(8), "basis"}},
     314                {{iBuilder->getStreamSetTy(4), "pat"}});
    310315
    311316    buildPreprocessKernel(ccck, iBuilder);
  • icGREP/icgrep-devel/icgrep/editd/pattern_compiler.cpp

    r5267 r5310  
    107107
    108108
    109     Var * output = mKernel.addOutput("E", mKernel.getBuilder()->getStreamSetTy(dist + 1));
     109    Var * output = mKernel.getOutputStreamVar("E");
    110110    for (int d = 0; d <= dist; d++) {
    111111        pb.createAssign(pb.createExtract(output, d), E[d]);
Note: See TracChangeset for help on using the changeset viewer.