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

Bug fixes and simplified MultiBlockKernel? logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/array-test.cpp

    r5486 r5755  
    156156    const unsigned bufferSegments = codegen::BufferSegments;
    157157   
    158     auto ByteStream = pxDriver.addBuffer(make_unique<SourceBuffer>(iBuilder, byteStreamTy));
    159 
    160     auto mmapK = pxDriver.addKernelInstance(make_unique<MMapSourceKernel>(iBuilder, segmentSize));
     158    auto ByteStream = pxDriver.addBuffer<SourceBuffer>(iBuilder, byteStreamTy);
     159
     160    auto mmapK = pxDriver.addKernelInstance<MMapSourceKernel>(iBuilder, segmentSize);
    161161    mmapK->setInitialArguments({fileDecriptor});
    162162
    163163    pxDriver.makeKernelCall(mmapK, {}, {ByteStream});
    164164
    165     auto BasisBits = pxDriver.addBuffer(make_unique<CircularBuffer>(iBuilder, byteStreamTy, segmentSize * bufferSegments));
    166 
    167     auto s2pk = pxDriver.addKernelInstance(make_unique<S2PKernel>(iBuilder));
     165    auto BasisBits = pxDriver.addBuffer<CircularBuffer>(iBuilder, byteStreamTy, segmentSize * bufferSegments);
     166
     167    auto s2pk = pxDriver.addKernelInstance<S2PKernel>(iBuilder, true);
    168168    pxDriver.makeKernelCall(s2pk, {ByteStream}, {BasisBits});
    169169
    170     auto bm = pxDriver.addKernelInstance(make_unique<ParenthesisMatchingKernel>(iBuilder, count));
    171 
    172     auto matches = pxDriver.addBuffer(make_unique<ExpandableBuffer>(iBuilder, iBuilder->getStreamSetTy(count), segmentSize * bufferSegments));
    173 
    174     auto errors = pxDriver.addBuffer(make_unique<CircularBuffer>(iBuilder, iBuilder->getStreamTy(), segmentSize * bufferSegments));
     170    auto bm = pxDriver.addKernelInstance<ParenthesisMatchingKernel>(iBuilder, count);
     171
     172    auto matches = pxDriver.addBuffer<ExpandableBuffer>(iBuilder, iBuilder->getStreamSetTy(count), segmentSize * bufferSegments);
     173
     174    auto errors = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamTy(), segmentSize * bufferSegments);
    175175
    176176    pxDriver.makeKernelCall(bm, {BasisBits}, {matches, errors});
    177177
    178     auto printer = pxDriver.addKernelInstance(make_unique<PrintStreamSet>(iBuilder, std::vector<std::string>{"matches", "errors"}));
     178    auto printer = pxDriver.addKernelInstance<PrintStreamSet>(iBuilder, std::vector<std::string>{"matches", "errors"});
    179179    pxDriver.makeKernelCall(printer, {&matches, &errors}, {});
    180180
Note: See TracChangeset for help on using the changeset viewer.