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

Last change on this file since 6126 was 6126, checked in by cameron, 11 months ago

Big-endian numbering option for CharClasses? kernel

File size: 1.2 KB
RevLine 
[5564]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
[6119]9#include <cc/alphabet.h>
[5564]10
11namespace kernel { class KernelBuilder; }
12namespace IDISA { class IDISA_Builder; }
[5748]13namespace re { class RE; class CC; }
[5564]14namespace kernel {
15
[5620]16struct CharClassesSignature {
[6126]17    CharClassesSignature(const std::vector<re::CC *> & ccs, bool useDirectCC, cc::BitNumbering basisNumbering);
[5620]18protected:
[5854]19    const bool mUseDirectCC;
[5620]20    const std::string mSignature;
21};
22
23class CharClassesKernel : public CharClassesSignature, public pablo::PabloKernel {
[5564]24public:
[6119]25    CharClassesKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, std::vector<re::CC *> && ccs, bool useDirectCC = false, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
[5620]26    bool hasSignature() const override { return true; }
27    std::string makeSignature(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
28    bool isCachable() const override { return true; }
[5564]29protected:
30    void generatePabloMethod() override;
31protected:
[6126]32    std::vector<re::CC *> mCCs;
[6119]33    cc::BitNumbering mBasisSetNumbering;
[6126]34
[5564]35};
36
37}
38#endif
Note: See TracBrowser for help on using the repository browser.