Ignore:
Timestamp:
Apr 22, 2017, 4:03:25 PM (2 years ago)
Author:
nmedfort
Message:

Removed non-functional CUDA code from icgrep and consolidated grep and multigrep mode into a single function; allowed segment parallel pipeline to utilize process as its initial thread; modified MMapSourceKernel to map and perform mmap directly and advise the OS to drop consumed data streams.

File:
1 edited

Legend:

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

    r5406 r5418  
    1414namespace re { class RE; }
    1515
    16     typedef void (*GrepFunctionType)(char * byte_data, size_t filesize, const int fileIdx);
    17     typedef uint64_t (*GrepFunctionType_CountOnly)(char * byte_data, size_t filesize, const int fileIdx);
    18     typedef void (*GrepFunctionType_CPU)(char * rslt, char * LineBreak, char * byte_data, size_t filesize, const int fileIdx);
    1916class GrepEngine {
    2017public:
     
    2219    GrepEngine();
    2320
    24     void grepCodeGen(std::string moduleName, re::RE * re_ast, bool CountOnly, bool UTF_16 = false, GrepType grepType = GrepType::Normal, const bool usingStdIn = false);
     21    void grepCodeGen(std::string moduleName, std::vector<re::RE *> REs, bool CountOnly, bool UTF_16, GrepSource grepSource, GrepType grepType = GrepType::Normal);
    2522
    26     void grepCodeGen(std::string moduleName, std::vector<re::RE *> REs, bool CountOnly, bool UTF_16 = false, GrepType grepType = GrepType::Normal, const bool usingStdIn = false);
    27      
    28     void doGrep(const std::string & fileName, const int fileIdx, bool CountOnly, std::vector<size_t> & total_CountOnly);
     23    uint64_t doGrep(const std::string & fileName, const int fileIdx) const;
    2924
    30     void doGrep(const int fileIdx, bool CountOnly, std::vector<size_t> & total_CountOnly);
     25    uint64_t doGrep(const uint32_t fileDescriptor, const int fileIdx) const;
    3126   
    32     re::CC *  grepCodepoints();
     27    void doGrep(const char * buffer, const uint64_t length, const int fileIdx) const;
     28
     29    re::CC * grepCodepoints();
    3330
    3431    const std::vector<std::string> & grepPropertyValues(const std::string & propertyName);
     
    3633private:
    3734   
    38     GrepFunctionType mGrepFunction;
    39     GrepFunctionType_CountOnly mGrepFunction_CountOnly;
    40 #ifdef CUDA_ENABLED
    41     GrepFunctionType_CPU mGrepFunction_CPU;
    42 #endif
     35    void * mGrepFunction;
    4336};
    4437
Note: See TracChangeset for help on using the changeset viewer.