Ignore:
Timestamp:
Nov 28, 2017, 1:45:19 AM (21 months ago)
Author:
nmedfort
Message:

Bug fix for segment pipeline parallel mode + memory management improvements.

File:
1 edited

Legend:

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

    r5744 r5748  
    116116    const auto n = REs.size();
    117117   
    118     std::vector<std::vector<UCD::UnicodeSet>> charclasses(n);
     118    std::vector<std::vector<re::CC *>> charclasses(n);
    119119   
    120120    for (unsigned i = 0; i < n; i++) {
    121121        REs[i] = re::resolveNames(REs[i]);
    122         std::vector<UCD::UnicodeSet> UnicodeSets = re::collect_UnicodeSets(REs[i]);
     122        const auto UnicodeSets = re::collectUnicodeSets(REs[i]);
    123123        std::vector<std::vector<unsigned>> exclusiveSetIDs;
    124124        doMultiplexCCs(UnicodeSets, exclusiveSetIDs, charclasses[i]);
     
    454454void * GrepEngine::DoGrepThreadMethod() {
    455455    size_t fileIdx;
    456     bool readyToPrint = false;
    457    
     456
    458457    count_mutex.lock();
    459458    fileIdx = mNextFileToGrep;
     
    483482    count_mutex.lock();
    484483    fileIdx = mNextFileToPrint;
    485    
    486     if (fileIdx < inputFiles.size()) {
    487         readyToPrint = ((fileIdx == 0) || (mFileStatus[fileIdx - 1] == FileStatus::PrintComplete)) && (mFileStatus[fileIdx] == FileStatus::GrepComplete);
    488         if (fileIdx < inputFiles.size() && readyToPrint) {
    489             mFileStatus[fileIdx] = FileStatus::Printing;
    490             mNextFileToPrint++;
    491         }
     484    bool readyToPrint = ((fileIdx == 0) || (mFileStatus[fileIdx - 1] == FileStatus::PrintComplete)) && (mFileStatus[fileIdx] == FileStatus::GrepComplete);
     485    if (fileIdx < inputFiles.size() && readyToPrint) {
     486        mFileStatus[fileIdx] = FileStatus::Printing;
     487        mNextFileToPrint++;
    492488    }
    493489    count_mutex.unlock();
Note: See TracChangeset for help on using the changeset viewer.