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

Last change on this file since 5620 was 5620, checked in by nmedfort, 20 months ago

Bug fixes for multigrep mode. Optional PabloKernel? branch hit counter added. Minor optimizations.

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#include <UCD/resolve_properties.h>
10
11namespace kernel { class KernelBuilder; }
12namespace IDISA { class IDISA_Builder; }
13namespace re { class RE; }
14namespace kernel {
15
16struct CharClassesSignature {
17    CharClassesSignature(const std::vector<UCD::UnicodeSet> & ccs);
18protected:
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<UCD::UnicodeSet> && ccs);
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<UCD::UnicodeSet> mCCs;
32};
33
34}
35#endif
Note: See TracBrowser for help on using the repository browser.