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

Last change on this file since 5245 was 5245, checked in by nmedfort, 20 months ago

Work on bracket matching problem

File size: 1.3 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 "streamset.h"
9#include "interface.h"
10#include "kernel.h"
11#include <pablo/pablo_kernel.h>
12
13namespace re {
14    class CC;
15}
16
17namespace kernel {
18
19class KernelBuilder;
20
21class DirectCharacterClassKernelBuilder : public KernelBuilder {
22public:
23   
24    DirectCharacterClassKernelBuilder(IDISA::IDISA_Builder * iBuilder, std::string ccSetName, std::vector<re::CC *> charClasses, unsigned codeUnitSize)
25    : KernelBuilder(iBuilder, "cc",
26                  {Binding{iBuilder->getStreamSetTy(1, 8 * codeUnitSize), "codeUnitStream"}},
27                  {Binding{iBuilder->getStreamSetTy(charClasses.size(), 1), "ccStream"}},
28                  {}, {}, {})
29    , mCharClasses(charClasses)
30    , mCodeUnitSize(codeUnitSize) {
31    }
32   
33   
34private:
35    void generateDoBlockMethod() override;
36    std::vector<re::CC *> mCharClasses;
37    unsigned mCodeUnitSize;
38   
39};
40
41class ParabixCharacterClassKernelBuilder: public pablo::PabloKernel {
42public:
43    ParabixCharacterClassKernelBuilder(IDISA::IDISA_Builder * iBuilder, std::string ccSetName, const std::vector<re::CC *> & charClasses, unsigned basisBitsCount);
44};
45
46}
47#endif
Note: See TracBrowser for help on using the repository browser.