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

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

Large refactoring step. Removed IR generation code from Kernel (formally KernelBuilder?) and moved it into the new KernelBuilder? class.

File size: 1.1 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(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) 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(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) 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.