Ignore:
Timestamp:
Jan 10, 2017, 5:43:35 PM (3 years ago)
Author:
cameron
Message:

Add mmap kernel to all pipelines

File:
1 edited

Legend:

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

    r5246 r5254  
    2020#include <kernels/kernel.h>
    2121#include <kernels/pipeline.h>
    22 #include <kernels/pipeline.h>
     22#include <kernels/mmap_kernel.h>
    2323#include <kernels/s2p_kernel.h>
    2424#include <kernels/scanmatchgen.h>
     
    291291       
    292292    ExternalFileBuffer ByteStream(iBuilder, iBuilder->getStreamSetTy(1, 8));
     293   
     294    kernel::MMapSourceKernel mmapK(iBuilder, iBuilder->getStride());
     295    mmapK.generateKernel({}, {&ByteStream});
     296    mmapK.setInitialArguments({fileSize});
     297   
    293298    CircularBuffer BasisBits(iBuilder, iBuilder->getStreamSetTy(8, 1), segmentSize * bufferSegments);
    294299
     
    308313        icgrepK.generateKernel({&BasisBits}, {});       
    309314        if (pipelineParallel){
    310             generatePipelineParallel(iBuilder, {&s2pk, &icgrepK});
     315            generatePipelineParallel(iBuilder, {&mmapK, &s2pk, &icgrepK});
    311316        } else if (segmentPipelineParallel){
    312             generateSegmentParallelPipeline(iBuilder, {&s2pk, &icgrepK});
     317            generateSegmentParallelPipeline(iBuilder, {&mmapK, &s2pk, &icgrepK});
    313318        } else {
    314             generatePipelineLoop(iBuilder, {&s2pk, &icgrepK});
     319            generatePipelineLoop(iBuilder, {&mmapK, &s2pk, &icgrepK});
    315320        }
    316321
     
    326331
    327332            icgrepK.generateKernel({&BasisBits},  {&MatchResults});
    328             generatePipelineLoop(iBuilder, {&s2pk, &icgrepK});
     333            generatePipelineLoop(iBuilder, {&mmapK, &s2pk, &icgrepK});
    329334
    330335        }
     
    341346
    342347            if (pipelineParallel){
    343                 generatePipelineParallel(iBuilder, {&s2pk, &icgrepK, &scanMatchK});
     348                generatePipelineParallel(iBuilder, {&mmapK, &s2pk, &icgrepK, &scanMatchK});
    344349            } else if (segmentPipelineParallel){
    345                 generateSegmentParallelPipeline(iBuilder, {&s2pk, &icgrepK, &scanMatchK});
     350                generateSegmentParallelPipeline(iBuilder, {&mmapK, &s2pk, &icgrepK, &scanMatchK});
    346351            }  else{
    347                 generatePipelineLoop(iBuilder, {&s2pk, &icgrepK, &scanMatchK});
     352                generatePipelineLoop(iBuilder, {&mmapK, &s2pk, &icgrepK, &scanMatchK});
    348353            }
    349354        }
Note: See TracChangeset for help on using the changeset viewer.