Changeset 5318


Ignore:
Timestamp:
Feb 14, 2017, 3:35:48 PM (3 years ago)
Author:
lindanl
Message:

Some fixes for editd on GPU. Add one missing file for icgrep(GPU).

Location:
icGREP/icgrep-devel/icgrep
Files:
1 added
1 edited

Legend:

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

    r5310 r5318  
    479479    Type * const stridesTy = PointerType::get(int32ty, 1);
    480480
    481     ExternalFileBuffer CCStream(iBuilder, iBuilder->getStreamSetTy( 4, 1), addrSpace);
     481    ExternalFileBuffer CCStream(iBuilder, iBuilder->getStreamSetTy(4), addrSpace);
    482482    ExternalFileBuffer ResultStream(iBuilder, iBuilder->getStreamSetTy( editDistance+1, 1), addrSpace);
     483
     484    MMapSourceKernel mmapK(iBuilder);
     485    mmapK.generateKernel({}, {&CCStream});
    483486
    484487    kernel::editdGPUKernel editdk(iBuilder, editDistance, patternLen);
     
    515518    CCStream.setStreamSetBuffer(inputThreadPtr, inputSize);
    516519    ResultStream.setEmptyBuffer(resultStreamPtr);
     520    mmapK.setInitialArguments({inputSize});
    517521
    518522    const unsigned numOfCarries = patternLen * (editDistance + 1) * 4;
     
    523527    editdk.setInitialArguments({pattStream, strideCarry});
    524528   
    525     generatePipelineLoop(iBuilder, {&editdk});
     529    generatePipelineLoop(iBuilder, {&mmapK, &editdk});
    526530       
    527531    iBuilder->CreateRetVoid();
     
    622626
    623627    ExternalFileBuffer MatchResults(iBuilder, iBuilder->getStreamSetTy( editDistance+1, 1));
     628
     629    MMapSourceKernel mmapK(iBuilder);
     630    mmapK.generateKernel({}, {&MatchResults});
     631
    624632    kernel::editdScanKernel editdScanK(iBuilder, editDistance);
    625633    editdScanK.generateKernel({&MatchResults}, {});               
     
    637645
    638646    MatchResults.setStreamSetBuffer(inputStream, fileSize);
     647    mmapK.setInitialArguments({fileSize});
    639648   
    640     generatePipelineLoop(iBuilder, {&editdScanK});
     649    generatePipelineLoop(iBuilder, {&mmapK, &editdScanK});
    641650       
    642651    iBuilder->CreateRetVoid();
Note: See TracChangeset for help on using the changeset viewer.