source: icGREP/icgrep-devel/icgrep/kernels/cc_kernel.h @ 5864

Last change on this file since 5864 was 5820, checked in by cameron, 18 months ago

Bug fix for DirectCharacterClassKernelBuilder?

File size: 1.2 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef CC_KERNEL_H
6#define CC_KERNEL_H
7
8#include <pablo/pablo_kernel.h>
9
10namespace IDISA { class IDISA_Builder; }
11namespace re { class CC; }
12
13namespace kernel {
14
15class DirectCharacterClassKernelBuilder final : public BlockOrientedKernel {
16public:   
17    DirectCharacterClassKernelBuilder(const std::unique_ptr<KernelBuilder> & b, std::string ccSetName, std::vector<re::CC *> charClasses, unsigned codeUnitSize);
18    void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
19    bool isCachable() const override { return true;}
20    bool hasSignature() const override { return false; }
21private:
22    const std::vector<re::CC *> mCharClasses;
23    const unsigned              mCodeUnitSize;
24   
25};
26
27class ParabixCharacterClassKernelBuilder final : public pablo::PabloKernel {
28public:
29    ParabixCharacterClassKernelBuilder(const std::unique_ptr<KernelBuilder> & b, std::string ccSetName, const std::vector<re::CC *> & charClasses, unsigned codeUnitSize);
30protected:
31    void generatePabloMethod() override;
32private:
33    const std::vector<re::CC *> mCharClasses;
34};
35
36}
37#endif
Note: See TracBrowser for help on using the repository browser.