Ignore:
Timestamp:
Dec 28, 2016, 7:21:28 PM (2 years ago)
Author:
nmedfort
Message:

Cleaned up memory leaks + some warning messages.

Location:
icGREP/icgrep-devel/icgrep/editd
Files:
2 edited

Legend:

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

    r5238 r5240  
    7979void run_second_filter(int total_len, int pattern_segs, float errRate){
    8080   
    81     if(matchList.size() == 0) return;
     81    if(matchList.empty()) return;
    8282
    8383    //remove the duplicates
  • icGREP/icgrep-devel/icgrep/editd/editd_gpu_kernel.cpp

    r5238 r5240  
    8181    Function * bidFunc = cast<Function>(m->getOrInsertFunction("llvm.nvvm.read.ptx.sreg.ctaid.x", int32ty, nullptr));
    8282    Value * bid = iBuilder->CreateCall(bidFunc);
    83     Value * pattStartPtr = iBuilder->CreateGEP(pattBuf, {iBuilder->CreateMul(pattLen, bid)});
    84     Value * pattPtr = iBuilder->CreateGEP(pattStartPtr, {pattPos});
     83    Value * pattStartPtr = iBuilder->CreateGEP(pattBuf, iBuilder->CreateMul(pattLen, bid));
     84    Value * pattPtr = iBuilder->CreateGEP(pattStartPtr, pattPos);
    8585    Value * pattCh = iBuilder->CreateLoad(pattPtr);
    8686    Value * pattIdx = iBuilder->CreateAnd(iBuilder->CreateLShr(pattCh, 1), ConstantInt::get(int8ty, 3));
     
    9595
    9696    for(unsigned i = 1; i<mPatternLen; i++){     
    97         pattPtr = iBuilder->CreateGEP(pattStartPtr, {pattPos});
     97        pattPtr = iBuilder->CreateGEP(pattStartPtr, pattPos);
    9898        pattCh = iBuilder->CreateLoad(pattPtr);
    9999        pattIdx = iBuilder->CreateAnd(iBuilder->CreateLShr(pattCh, 1), ConstantInt::get(int8ty, 3));
Note: See TracChangeset for help on using the changeset viewer.