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

Bug fixes and simplified MultiBlockKernel? logic

File:
1 edited

Legend:

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

    r5475 r5755  
    5656    unsigned bufferSegments = codegen::BufferSegments;
    5757
    58     StreamSetBuffer * ByteStream = pxDriver.addBuffer(make_unique<SourceBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8)));
    59     kernel::Kernel * sourceK = pxDriver.addKernelInstance(make_unique<kernel::MemorySourceKernel>(iBuilder, iBuilder->getInt8PtrTy(), segmentSize));
     58    StreamSetBuffer * ByteStream = pxDriver.addBuffer<SourceBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8));
     59    kernel::Kernel * sourceK = pxDriver.addKernelInstance<kernel::MemorySourceKernel>(iBuilder, iBuilder->getInt8PtrTy(), segmentSize);
    6060    sourceK->setInitialArguments({inputStream, fileSize});
    6161    pxDriver.makeKernelCall(sourceK, {}, {ByteStream});
    6262
    63     StreamSetBuffer * MatchResults = pxDriver.addBuffer(make_unique<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 1), segmentSize * bufferSegments));
    64     kernel::Kernel * linefeedK = pxDriver.addKernelInstance(make_unique<kernel::DirectCharacterClassKernelBuilder>(iBuilder, "linefeed", std::vector<re::CC *>{re::makeCC(0x0A)}, 1));
     63    StreamSetBuffer * MatchResults = pxDriver.addBuffer<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 1), segmentSize * bufferSegments);
     64    kernel::Kernel * linefeedK = pxDriver.addKernelInstance<kernel::DirectCharacterClassKernelBuilder>(iBuilder, "linefeed", std::vector<re::CC *>{re::makeCC(0x0A)}, 1);
    6565    pxDriver.makeKernelCall(linefeedK, {ByteStream}, {MatchResults});
    6666   
    67     kernel::Kernel * scanMatchK = pxDriver.addKernelInstance(make_unique<kernel::CCScanKernel>(iBuilder, 1));
     67    kernel::Kernel * scanMatchK = pxDriver.addKernelInstance<kernel::CCScanKernel>(iBuilder, 1);
    6868    pxDriver.makeKernelCall(scanMatchK, {MatchResults}, {});
    6969   
Note: See TracChangeset for help on using the changeset viewer.