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

Last change on this file since 5267 was 5267, checked in by nmedfort, 3 years ago

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

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