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

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

Merged PabloFunction? and PabloKernel? classes. Updated projects where necessary.

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                  {}, {}, {}), mCharClasses(charClasses), mCodeUnitSize(codeUnitSize) {}
29   
30   
31private:
32    void generateDoBlockMethod() override;
33    std::vector<re::CC *> mCharClasses;
34    unsigned mCodeUnitSize;
35   
36};
37
38class ParabixCharacterClassKernelBuilder: public pablo::PabloKernel {
39public:
40    ParabixCharacterClassKernelBuilder(IDISA::IDISA_Builder * iBuilder, std::string ccSetName, const std::vector<re::CC *> & charClasses, unsigned basisBitsCount);
41};
42
43}
44#endif
Note: See TracBrowser for help on using the repository browser.