source: icGREP/icgrep-devel/icgrep/grep_engine.h @ 5693

Last change on this file since 5693 was 5693, checked in by cameron, 18 months ago

Unified FDsource kernel; filename - now interpreted as stdin

File size: 1.2 KB
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6#ifndef GREP_ENGINE_H
7#define GREP_ENGINE_H
8#include <grep_interface.h>
9#include <grep_type.h>  // for GrepType, GrepType::Normal
10#include <string>       // for string
11#include <vector>
12#include <re/re_parser.h>
13#include <re/re_multiplex.h>
14
15namespace re { class CC; }
16namespace re { class RE; }
17namespace llvm { namespace cl { class OptionCategory; } }
18class Driver;
19
20
21namespace grep {
22
23// Thread function only.
24void *DoGrepThreadFunction(void *args);
25   
26class GrepEngine {
27public:
28
29    GrepEngine();
30
31
32    ~GrepEngine();
33
34    void grepCodeGen(std::vector<re::RE *> REs, GrepModeType grepMode);
35
36    void doGrep(const std::string & fileName, std::string & PTXFilename) const;
37   
38    uint64_t doGrep(const std::string & fileName, const uint32_t fileIdx) const;
39
40    uint64_t doGrep(const int32_t fileDescriptor, const uint32_t fileIdx) const;
41       
42private:
43   
44    Driver * mGrepDriver;
45};
46
47void initFileResult(std::vector<std::string> filenames);
48   
49void PrintResults();
50   
51}
52
53#endif
Note: See TracBrowser for help on using the repository browser.