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

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

Partial removal of BlockNo?

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
[5283]17class DirectCharacterClassKernelBuilder : public BlockOrientedKernel {
[5140]18public:
19   
[5245]20    DirectCharacterClassKernelBuilder(IDISA::IDISA_Builder * iBuilder, std::string ccSetName, std::vector<re::CC *> charClasses, unsigned codeUnitSize)
[5283]21    : BlockOrientedKernel(iBuilder, std::move(ccSetName),
[5217]22                  {Binding{iBuilder->getStreamSetTy(1, 8 * codeUnitSize), "codeUnitStream"}},
23                  {Binding{iBuilder->getStreamSetTy(charClasses.size(), 1), "ccStream"}},
[5245]24                  {}, {}, {})
25    , mCharClasses(charClasses)
26    , mCodeUnitSize(codeUnitSize) {
27    }
[5140]28   
[5297]29    void generateDoBlockMethod() override;
[5283]30
[5140]31private:
32    std::vector<re::CC *> mCharClasses;
33    unsigned mCodeUnitSize;
34   
35};
36
37class ParabixCharacterClassKernelBuilder: public pablo::PabloKernel {
38public:
[5217]39    ParabixCharacterClassKernelBuilder(IDISA::IDISA_Builder * iBuilder, std::string ccSetName, const std::vector<re::CC *> & charClasses, unsigned basisBitsCount);
[5140]40};
41
42}
43#endif
Note: See TracBrowser for help on using the repository browser.