source: icGREP/icgrep-devel/icgrep/kernels/linebreak_kernel.h

Last change on this file was 6184, checked in by nmedfort, 9 months ago

Initial version of PipelineKernel? + revised StreamSet? model.

File size: 1.2 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 LINEBREAK_KERNEL_H
6#define LINEBREAK_KERNEL_H
7
8#include <pablo/pablo_kernel.h>  // for PabloKernel
9#include <cc/alphabet.h>
10
11namespace kernel { class KernelBuilder; }
12
13namespace kernel {
14#define USE_DIRECT_LF_BUILDER
15
16class LineFeedKernelBuilder final : public pablo::PabloKernel {
17public:
18    LineFeedKernelBuilder(const std::unique_ptr<KernelBuilder> & b, StreamSet * BasisBits, StreamSet * LineFeedStream, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
19    bool isCachable() const override { return true; }
20    bool hasSignature() const override { return false; }
21protected:
22    void generatePabloMethod() override;
23    unsigned mNumOfStreams;
24    unsigned mStreamFieldWidth;
25    cc::BitNumbering mBasisSetNumbering;
26};
27
28
29class LineBreakKernelBuilder final : public pablo::PabloKernel {
30public:
31    LineBreakKernelBuilder(const std::unique_ptr<KernelBuilder> & b, unsigned basisBitsCount);
32    bool isCachable() const override { return true; }
33    bool hasSignature() const override { return false; }
34protected:
35    void generatePabloMethod() override;
36};
37
38}
39#endif
Note: See TracBrowser for help on using the repository browser.