Ignore:
Timestamp:
May 1, 2018, 6:18:30 PM (15 months ago)
Author:
nmedfort
Message:

Removed temporary buffers from pipeline and placed them in the source kernels.

File:
1 edited

Legend:

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

    r5935 r6008  
    241241    Type * const sizeTy = idb->getSizeTy();
    242242    Type * const voidTy = idb->getVoidTy();
    243     Type * const inputType = PointerType::get(ArrayType::get(ArrayType::get(idb->getBitBlockType(), 8), 1), 0);
     243    Type * const inputType = idb->getIntNTy(1)->getPointerTo();
    244244
    245245    idb->LinkFunction("wrapped_report_pos", &wrapped_report_pos);
     
    258258
    259259    auto ChStream = pxDriver.addBuffer<SourceBuffer>(idb, idb->getStreamSetTy(4));
    260     auto mmapK = pxDriver.addKernelInstance<MemorySourceKernel>(idb, inputType);
     260    auto mmapK = pxDriver.addKernelInstance<MemorySourceKernel>(idb, 4, 1);
    261261    mmapK->setInitialArguments({inputStream, fileSize});
    262262    pxDriver.makeKernelCall(mmapK, {}, {ChStream});
     
    417417    Type * const sizeTy = idb->getSizeTy();
    418418    Type * const voidTy = idb->getVoidTy();
    419     Type * const inputType = PointerType::get(ArrayType::get(ArrayType::get(idb->getBitBlockType(), 8), 1), 0);
     419    Type * const inputType = idb->getIntNTy(1)->getPointerTo();
    420420    Type * const patternPtrTy = PointerType::get(idb->getInt8Ty(), 0);
    421421
     
    437437
    438438    auto ChStream = pxDriver.addBuffer<SourceBuffer>(idb, idb->getStreamSetTy(4));
    439     auto mmapK = pxDriver.addKernelInstance<MemorySourceKernel>(idb, inputType);
     439    auto mmapK = pxDriver.addKernelInstance<MemorySourceKernel>(idb, 4, 1);
    440440    mmapK->setInitialArguments({inputStream, fileSize});
    441441    pxDriver.makeKernelCall(mmapK, {}, {ChStream});
     
    680680    fileSize->setName("fileSize");
    681681
    682     StreamSetBuffer * MatchResults = pxDriver.addBuffer<SourceBuffer>(iBuilder, iBuilder->getStreamSetTy(editDistance+1));
    683     kernel::Kernel * sourceK = pxDriver.addKernelInstance<kernel::MemorySourceKernel>(iBuilder, inputType);
     682    StreamSetBuffer * MatchResults = pxDriver.addBuffer<SourceBuffer>(iBuilder, iBuilder->getStreamSetTy(editDistance + 1));
     683    kernel::Kernel * sourceK = pxDriver.addKernelInstance<kernel::MemorySourceKernel>(iBuilder, editDistance + 1, 8);
    684684    sourceK->setInitialArguments({inputStream, fileSize});
    685685    pxDriver.makeKernelCall(sourceK, {}, {MatchResults});
Note: See TracChangeset for help on using the changeset viewer.