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/u8u16.cpp

    r5109 r5133  
    234234    CircularBuffer U16out(iBuilder, StreamSetType(1, i16), u16OutputBlocks);
    235235
    236     s2pKernel  s2pk(iBuilder, ByteStream, BasisBits);
    237     s2pk.generateKernel();
    238    
     236    s2pKernel  s2pk(iBuilder);
     237    s2pk.generateKernel({&ByteStream}, {&BasisBits});
     238
    239239    pablo_function_passes(function);
    240     pablo::PabloKernel  u8u16k(iBuilder, "u8u16", function, BasisBits, U8u16Bits, {});
    241     u8u16k.generateKernel();
    242    
    243     deletionKernel delK(iBuilder, iBuilder->getBitBlockWidth()/16, 16, U8u16Bits, U16Bits, DeletionCounts);
    244     delK.generateKernel();
    245    
    246     p2s_16Kernel_withCompressedOutput p2sk(iBuilder, U16Bits, DeletionCounts, U16out);
    247     p2sk.generateKernel();
     240    pablo::PabloKernel  u8u16k(iBuilder, "u8u16", function, {});
     241    u8u16k.generateKernel({&BasisBits}, {&U8u16Bits});
     242   
     243    deletionKernel delK(iBuilder, iBuilder->getBitBlockWidth()/16, 16);
     244    delK.generateKernel({&U8u16Bits}, {&U16Bits, &DeletionCounts});
     245   
     246    p2s_16Kernel_withCompressedOutput p2sk(iBuilder);
     247    p2sk.generateKernel({&U16Bits, &DeletionCounts}, {&U16out});
    248248   
    249249    Type * const size_ty = iBuilder->getSizeTy();
     
    271271    U16out.allocateBuffer();
    272272
    273     Value * s2pInstance = s2pk.createInstance({}, {&ByteStream}, {&BasisBits});
    274     Value * u8u16Instance = u8u16k.createInstance({}, {&BasisBits}, {&U8u16Bits});
    275     Value * delInstance = delK.createInstance({}, {&U8u16Bits}, {&U16Bits, &DeletionCounts});
    276     Value * p2sInstance = p2sk.createInstance({}, {&U16Bits, &DeletionCounts}, {&U16out});
     273    Value * s2pInstance = s2pk.createInstance({});
     274    Value * u8u16Instance = u8u16k.createInstance({});
     275    Value * delInstance = delK.createInstance({});
     276    Value * p2sInstance = p2sk.createInstance({});
    277277   
    278278    generatePipelineLoop(iBuilder, {&s2pk, &u8u16k, &delK, &p2sk}, {s2pInstance, u8u16Instance, delInstance, p2sInstance}, fileSize);
Note: See TracChangeset for help on using the changeset viewer.