Ignore:
Timestamp:
Nov 14, 2017, 10:17:19 AM (17 months ago)
Author:
cameron
Message:

Incremental object caching; multithreaded print

File:
1 edited

Legend:

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

    r5707 r5735  
    3131    virtual void grepCodeGen(std::vector<re::RE *> REs);
    3232    bool searchAllFiles();
    33     void writeMatches();
    34    
     33    void * DoGrepThreadMethod();
     34
    3535protected:
    3636    std::pair<parabix::StreamSetBuffer *, parabix::StreamSetBuffer *> grepPipeline(std::vector<re::RE *> & REs, parabix::StreamSetBuffer * ByteStream);
    3737
    38     static void * DoGrepThreadFunction(void *args);
    3938    virtual uint64_t doGrep(const std::string & fileName, const uint32_t fileIdx);
    4039    std::string linePrefix(std::string fileName);
     
    4342    Driver * mGrepDriver;
    4443
     44    enum class FileStatus {Pending, InGrep, GrepComplete, Printing, PrintComplete};
     45    std::mutex count_mutex;
     46    size_t mNextFileToGrep;
     47    size_t mNextFileToPrint;
    4548    std::vector<std::string> inputFiles;
    4649    std::vector<std::unique_ptr<std::stringstream>> mResultStrs;
     50    std::vector<FileStatus> mFileStatus;
     51    bool grepMatchFound;
    4752   
    4853    std::string mFileSuffix;
    49    
    50     bool grepMatchFound;
    51     std::mutex count_mutex;
    52     size_t fileCount;
    5354    bool mMoveMatchesToEOL;
     55    pthread_t mEngineThread;
    5456};
    5557
Note: See TracChangeset for help on using the changeset viewer.