Ignore:
Timestamp:
Dec 3, 2017, 12:40:40 PM (17 months ago)
Author:
nmedfort
Message:

Bug fixes and simplified MultiBlockKernel? logic

File:
1 edited

Legend:

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

    r5732 r5755  
    163163    iBuilder->SetInsertPoint(BasicBlock::Create(m->getContext(), "entry", main,0));
    164164
    165     StreamSetBuffer * const ByteStream = pxDriver.addBuffer(make_unique<SourceBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8)));
    166 
    167     StreamSetBuffer * const BasisBits = pxDriver.addBuffer(make_unique<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1), segmentSize * bufferSegments));
    168 
    169     Kernel * mmapK = pxDriver.addKernelInstance(make_unique<MMapSourceKernel>(iBuilder));
     165    StreamSetBuffer * const ByteStream = pxDriver.addBuffer<SourceBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8));
     166
     167    StreamSetBuffer * const BasisBits = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1), segmentSize * bufferSegments);
     168
     169    Kernel * mmapK = pxDriver.addKernelInstance<MMapSourceKernel>(iBuilder);
    170170    mmapK->setInitialArguments({fileDecriptor});
    171171    pxDriver.makeKernelCall(mmapK, {}, {ByteStream});
    172172
    173     Kernel * s2pk = pxDriver.addKernelInstance(make_unique<S2PKernel>(iBuilder));
     173    Kernel * s2pk = pxDriver.addKernelInstance<S2PKernel>(iBuilder);
    174174    pxDriver.makeKernelCall(s2pk, {ByteStream}, {BasisBits});
    175175   
    176     Kernel * wck = pxDriver.addKernelInstance(make_unique<WordCountKernel>(iBuilder));
     176    Kernel * wck = pxDriver.addKernelInstance<WordCountKernel>(iBuilder);
    177177    pxDriver.makeKernelCall(wck, {BasisBits}, {});
    178178
Note: See TracChangeset for help on using the changeset viewer.