source: icGREP/icgrep-devel/icgrep/kernels/grep_kernel.h @ 5436

Last change on this file since 5436 was 5436, checked in by nmedfort, 2 years ago

Continued refactoring work. PabloKernel? now abstract base type with a 'generatePabloMethod' hook to generate Pablo code.

File size: 1.0 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 */
5#ifndef GREP_KERNEL_H
6#define GREP_KERNEL_H
7
8#include <pablo/pablo_kernel.h>  // for PabloKernel
9
10namespace IDISA { class IDISA_Builder; }
11namespace re { class RE; }
12namespace kernel {
13
14class ICgrepKernelBuilder: public pablo::PabloKernel {
15public:
16    ICgrepKernelBuilder(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, re::RE * const re_ast);   
17    std::string makeSignature() override;
18    bool isCachable() const override { return true; }
19protected:
20    void generatePabloMethod() override;
21private:
22    re::RE * const  mRE;
23    std::string     mSignature;
24};
25
26class InvertMatchesKernel : public BlockOrientedKernel {
27public:
28    InvertMatchesKernel(const std::unique_ptr<kernel::KernelBuilder> & builder);
29private:
30    void generateDoBlockMethod() override;
31};
32
33
34class PopcountKernel : public pablo::PabloKernel {
35public:
36    PopcountKernel(const std::unique_ptr<kernel::KernelBuilder> & builder);
37};
38
39}
40#endif
Note: See TracBrowser for help on using the repository browser.