Ignore:
Timestamp:
Aug 26, 2016, 9:33:51 AM (3 years ago)
Author:
cameron
Message:

Defer binding of buffers to stream sets until kernel generation

File:
1 edited

Legend:

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

    r5109 r5133  
    146146    SingleBlockBuffer BasisBits(iBuilder, StreamSetType(8, i1));
    147147   
    148     s2pKernel  s2pk(iBuilder, ByteStream, BasisBits);
    149     std::unique_ptr<Module> s2pM = s2pk.createKernelModule();
     148    s2pKernel  s2pk(iBuilder);
     149    std::unique_ptr<Module> s2pM = s2pk.createKernelModule({&ByteStream}, {&BasisBits});
    150150   
    151151    pablo_function_passes(function);
    152     pablo::PabloKernel  wck(iBuilder, "wc", function, BasisBits, {"lineCount", "wordCount", "charCount"});
    153    
    154     std::unique_ptr<Module> wcM = wck.createKernelModule();
     152    pablo::PabloKernel  wck(iBuilder, "wc", function, {"lineCount", "wordCount", "charCount"});
     153   
     154    std::unique_ptr<Module> wcM = wck.createKernelModule({&BasisBits}, {});
    155155   
    156156    s2pk.addKernelDeclarations(mMod);
     
    179179    BasisBits.allocateBuffer();
    180180   
    181     Value * s2pInstance = s2pk.createInstance({}, {&ByteStream}, {&BasisBits});;
    182     Value * wcInstance = wck.createInstance({}, {&BasisBits}, {});
     181    Value * s2pInstance = s2pk.createInstance({});
     182    Value * wcInstance = wck.createInstance({});
    183183   
    184184    generatePipelineLoop(iBuilder, {&s2pk, &wck}, {s2pInstance, wcInstance}, fileSize);
Note: See TracChangeset for help on using the changeset viewer.