Changeset 5348 for icGREP


Ignore:
Timestamp:
Feb 25, 2017, 3:43:49 PM (3 years ago)
Author:
xuedongx
Message:

tiny fix

File:
1 edited

Legend:

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

    r5343 r5348  
    2525#include <kernels/scanmatchgen.h>
    2626#include <kernels/streamset.h>
     27#include <kernels/interface.h>
    2728#include <pablo/pablo_compiler.h>
    2829#include <pablo/pablo_kernel.h>
     
    196197    }
    197198    else {
    198         Type * const outputStremType = PointerType::get(ArrayType::get(iBuilder->getBitBlockType(), 2), 1);
     199        Type * const outputStremType = PointerType::get(ArrayType::get(iBuilder->getBitBlockType(), 1), 1);
    199200        Value * outputStreamPtr = iBuilder->CreateGEP(iBuilder->CreateBitCast(outputPtr, outputStremType), startBlock);
    200201        Value * outputStream = iBuilder->CreateGEP(outputStreamPtr, tid);
     
    227228
    228229    const unsigned segmentSize = codegen::SegmentSize;
    229 
     230   
    230231    ExternalFileBuffer MatchResults(iBuilder, iBuilder->getStreamSetTy(1, 1));
    231232    MatchResults.setStreamSetBuffer(rsltStream, fileSize);
    232233
    233234    kernel::MMapSourceKernel mmapK1(iBuilder, segmentSize);
     235    mmapK1.setName("mmap1");
    234236    mmapK1.generateKernel({}, {&MatchResults});
    235237    mmapK1.setInitialArguments({fileSize});
    236238
    237 
    238239    ExternalFileBuffer LineBreak(iBuilder, iBuilder->getStreamSetTy(1, 1));
    239240    LineBreak.setStreamSetBuffer(lbStream, fileSize);
    240241   
    241242    kernel::MMapSourceKernel mmapK2(iBuilder, segmentSize);
     243    mmapK2.setName("mmap2");
    242244    mmapK2.generateKernel({}, {&LineBreak});
    243245    mmapK2.setInitialArguments({fileSize});
     
    245247    kernel::ScanMatchKernel scanMatchK(iBuilder, grepType);
    246248    scanMatchK.generateKernel({&MatchResults, &LineBreak}, {});
    247            
    248     scanMatchK.setInitialArguments({inputStream, fileSize, fileIdx});
     249    scanMatchK.setInitialArguments({iBuilder->CreateBitCast(inputStream, int8PtrTy), fileSize, fileIdx});
    249250   
    250251    generatePipelineLoop(iBuilder, {&mmapK1, &mmapK2, &scanMatchK});
     
    438439#ifdef CUDA_ENABLED   
    439440    Value * outputStream = nullptr;
    440     Type * const outputType = PointerType::get(ArrayType::get(iBuilder->getBitBlockType(), 2), addrSpace);
     441    Type * const outputType = PointerType::get(ArrayType::get(iBuilder->getBitBlockType(), 1), addrSpace);
    441442    if (codegen::NVPTX){
    442443        if (CountOnly){
     
    521522#ifdef CUDA_ENABLED
    522523        if (codegen::NVPTX){
    523             ExternalFileBuffer MatchResults(iBuilder, iBuilder->getStreamSetTy(2, 1), addrSpace);
     524            ExternalFileBuffer MatchResults(iBuilder, iBuilder->getStreamSetTy(1, 1), addrSpace);
    524525            MatchResults.setStreamSetBuffer(outputStream, fileSize);
    525526
Note: See TracChangeset for help on using the changeset viewer.