source: icGREP/icgrep-devel/icgrep/kernels/charclasses.h @ 5865

Last change on this file since 5865 was 5854, checked in by cameron, 21 months ago

UseDirectCC option for charclasses kernel

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 CHARCLASSES_H
6#define CHARCLASSES_H
7
8#include <pablo/pablo_kernel.h>  // for PabloKernel
9
10namespace kernel { class KernelBuilder; }
11namespace IDISA { class IDISA_Builder; }
12namespace re { class RE; class CC; }
13namespace kernel {
14
15struct CharClassesSignature {
16    CharClassesSignature(const std::vector<re::CC *> & ccs, bool useDirectCC);
17protected:
18    const bool mUseDirectCC;
19    const std::string mSignature;
20};
21
22class CharClassesKernel : public CharClassesSignature, public pablo::PabloKernel {
23public:
24    CharClassesKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, std::vector<re::CC *> && ccs, bool useDirectCC = false);
25    bool hasSignature() const override { return true; }
26    std::string makeSignature(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
27    bool isCachable() const override { return true; }
28protected:
29    void generatePabloMethod() override;
30protected:
31    std::vector<re::CC *> mCCs;
32   
33};
34
35}
36#endif
Note: See TracBrowser for help on using the repository browser.