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

Last change on this file since 5816 was 5576, checked in by lindanl, 2 years ago

minor fixes.

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;}
20private:
21    const std::vector<re::CC *> mCharClasses;
22    const unsigned              mCodeUnitSize;
23   
24};
25
26class ParabixCharacterClassKernelBuilder final : public pablo::PabloKernel {
27public:
28    ParabixCharacterClassKernelBuilder(const std::unique_ptr<KernelBuilder> & b, std::string ccSetName, const std::vector<re::CC *> & charClasses, unsigned codeUnitSize);
29protected:
30    void generatePabloMethod() override;
31private:
32    const std::vector<re::CC *> mCharClasses;
33};
34
35}
36#endif
Note: See TracBrowser for help on using the repository browser.