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

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

UseDirectCC option for charclasses kernel

File size: 1.1 KB
RevLine 
[5564]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; }
[5748]12namespace re { class RE; class CC; }
[5564]13namespace kernel {
14
[5620]15struct CharClassesSignature {
[5854]16    CharClassesSignature(const std::vector<re::CC *> & ccs, bool useDirectCC);
[5620]17protected:
[5854]18    const bool mUseDirectCC;
[5620]19    const std::string mSignature;
20};
21
22class CharClassesKernel : public CharClassesSignature, public pablo::PabloKernel {
[5564]23public:
[5854]24    CharClassesKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, std::vector<re::CC *> && ccs, bool useDirectCC = false);
[5620]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; }
[5564]28protected:
29    void generatePabloMethod() override;
30protected:
[5748]31    std::vector<re::CC *> mCCs;
[5854]32   
[5564]33};
34
35}
36#endif
Note: See TracBrowser for help on using the repository browser.