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

Last change on this file since 5549 was 5440, checked in by nmedfort, 2 years ago

Large refactoring step. Removed IR generation code from Kernel (formally KernelBuilder?) and moved it into the new KernelBuilder? class.

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