Ignore:
Timestamp:
Apr 28, 2017, 2:50:59 PM (2 years ago)
Author:
nmedfort
Message:

Refactored source kernels. icgrep from stdin should now be able to handle any file size.

File:
1 edited

Legend:

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

    r5425 r5429  
    2424#include <kernels/streamset.h>
    2525#include <kernels/s2p_kernel.h>
    26 #include <kernels/stdin_kernel.h>
     26#include <kernels/source_kernel.h>
    2727#include <kernels/stdout_kernel.h>
    28 #include <kernels/mmap_kernel.h>
    2928#include <kernels/lz4_index_decoder.h>
    3029#include <kernels/lz4_bytestream_decoder.h>
     
    7372    iBuilder->SetInsertPoint(BasicBlock::Create(M->getContext(), "entry", main, 0));
    7473
    75     StreamSetBuffer * const ByteStream = pxDriver.addBuffer(make_unique<SourceFileBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8)));
     74    StreamSetBuffer * const ByteStream = pxDriver.addBuffer(make_unique<SourceBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 8)));
    7675    StreamSetBuffer * const BasisBits = pxDriver.addBuffer(make_unique<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(8, 1), segmentSize * bufferSegments));
    7776    StreamSetBuffer * const Extenders = pxDriver.addBuffer(make_unique<CircularBuffer>(iBuilder, iBuilder->getStreamSetTy(1, 1), segmentSize * bufferSegments));
     
    8180
    8281   
    83     kernel::KernelBuilder * sourceK = pxDriver.addKernelInstance(make_unique<kernel::FileSourceKernel>(iBuilder, iBuilder->getInt8PtrTy(), segmentSize));
     82    kernel::KernelBuilder * sourceK = pxDriver.addKernelInstance(make_unique<kernel::MemorySourceKernel>(iBuilder, iBuilder->getInt8PtrTy(), segmentSize));
    8483    sourceK->setInitialArguments({inputStream, fileSize});
    8584    pxDriver.makeKernelCall(sourceK, {}, {ByteStream});
Note: See TracChangeset for help on using the changeset viewer.