Ignore:
Timestamp:
Jun 22, 2017, 1:55:52 PM (2 years ago)
Author:
lindanl
Message:

editd: number of groups is now defined by number of pattern segments.

File:
1 edited

Legend:

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

    r5523 r5528  
    149149            pattFile.close();
    150150        }
     151        codegen::GroupNum = pattVector.size();
    151152    }
    152153
     
    384385
    385386#define GROUPTHREADS 64
    386 #define GROUPBLOCKS 64
    387387
    388388void editdGPUCodeGen(unsigned patternLen){
     
    501501    Value * myResultStreamPtr = iBuilder->CreateGEP(resultStreamPtr, {iBuilder->CreateMul(strideBlocks, strideNo)});
    502502    Value * myResultStream = iBuilder->CreateLoad(iBuilder->CreateGEP(myResultStreamPtr, {iBuilder->getInt32(0), bid}));
    503     for (unsigned i=1; i<GROUPBLOCKS; i++){
     503    for (int i=1; i<codegen::GroupNum; i++){
    504504        Value * nextStreamPtr = iBuilder->CreateGEP(myResultStreamPtr, {iBuilder->CreateMul(outputBlocks, iBuilder->getInt32(i)), bid});
    505505        myResultStream = iBuilder->CreateOr(myResultStream, iBuilder->CreateLoad(nextStreamPtr));
     
    582582        std::string patterns((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
    583583
    584         editdGPUCodeGen(patterns.length()/GROUPTHREADS - 1);
     584        editdGPUCodeGen(patterns.length()/codegen::GroupNum - 1);
    585585        mergeGPUCodeGen();
    586586        ulong * rslt = RunPTX(PTXFilename, chStream, size, patterns.c_str(), patterns.length(), editDistance);
Note: See TracChangeset for help on using the changeset viewer.