Ignore:
Timestamp:
Apr 29, 2016, 4:05:57 PM (3 years ago)
Author:
lindanl
Message:

Passing file index instead of file name as internal state.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/scanmatchgen.cpp

    r5014 r5017  
    8484        matchProcessor = m->getOrInsertFunction("insert_codepoints", Type::getVoidTy(ctxt), T, T, T, S, nullptr);
    8585    } else {
    86         matchProcessor = m->getOrInsertFunction("wrapped_report_match", Type::getVoidTy(ctxt), T, T, T, S, T, S, nullptr);
     86        matchProcessor = m->getOrInsertFunction("wrapped_report_match", Type::getVoidTy(ctxt), T, T, T, S, T, T, nullptr);
    8787    }
    8888    iBuilder->SetInsertPoint(BasicBlock::Create(ctxt, "entry", function,0));
     
    158158    } else {
    159159        Value * fileSize = iBuilder->CreateLoad(kBuilder->getInternalStateInternal(instance, "FileSize"));
    160         Value * fileName = iBuilder->CreateLoad(kBuilder->getInternalStateInternal(instance, "FileName"));
    161         iBuilder->CreateCall(matchProcessor, std::vector<Value *>({matchRecordNum_phi, matchRecordStart_phi, matchRecordEnd, fileBuf, fileSize, fileName}));
     160        Value * fileIdx = iBuilder->CreateLoad(kBuilder->getInternalStateInternal(instance, "FileIdx"));
     161        iBuilder->CreateCall(matchProcessor, std::vector<Value *>({matchRecordNum_phi, matchRecordStart_phi, matchRecordEnd, fileBuf, fileSize, fileIdx}));
    162162    }
    163163
     
    217217    kBuilder->addInternalState(S, "FileBuf");
    218218    kBuilder->addInternalState(T, "FileSize");
    219     kBuilder->addInternalState(S, "FileName");
     219    kBuilder->addInternalState(T, "FileIdx");
    220220
    221221    Function * function = kBuilder->prepareFunction();
Note: See TracChangeset for help on using the changeset viewer.