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

Last change on this file since 6216 was 6216, checked in by cameron, 6 months ago

Abort on null: DirectCharacterClassKernel?, on by default

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#include <kernels/callback.h>
10
11namespace IDISA { class IDISA_Builder; }
12namespace re { class CC; }
13
14namespace kernel {
15
16class DirectCharacterClassKernelBuilder final : public pablo::PabloKernel {
17public:   
18    DirectCharacterClassKernelBuilder(const std::unique_ptr<KernelBuilder> & b, std::string ccSetName, std::vector<re::CC *> charClasses, StreamSet * byteStream, StreamSet * ccStream, Scalar * signalNullObject = nullptr);
19protected:
20    void generatePabloMethod() override;
21    Bindings makeInputScalarBindings(Scalar * signalNullObject);
22private:
23    const std::vector<re::CC *> mCharClasses;
24    bool mAbortOnNull;
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, StreamSet * basisStream, StreamSet * outputStream);
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.