source: icGREP/icgrep-devel/icgrep/kernels/streams_merge.h @ 6173

Last change on this file since 6173 was 6044, checked in by xwa163, 16 months ago
  1. Fix a bug of multiplexing lz4_grep in release build
  2. Combine compressed-space LineBreakStream? and CharClassStream? before doing PDEP and match copy in order to improve the performance
File size: 1.8 KB
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef STREAMSMERGE_H
6#define STREAMSMERGE_H
7
8#include "kernel.h"
9#include <vector>
10
11namespace IDISA { class IDISA_Builder; }
12
13namespace kernel {
14
15class StreamsMerge : public BlockOrientedKernel {
16public:
17   
18    StreamsMerge(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned streamsPerSet=1, unsigned inputSets = 1);
19   
20protected:
21   
22    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
23   
24private:
25    const unsigned mStreamsPerSet;
26    const unsigned mInputSets;
27};
28
29class StreamsCombineKernel : public BlockOrientedKernel {
30public:
31    StreamsCombineKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, std::vector<unsigned> streamsNumOfSets);
32protected:
33    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
34private:
35    const std::vector<unsigned> mStreamsNumOfSets;
36};
37
38class StreamsSplitKernel : public BlockOrientedKernel {
39public:
40    StreamsSplitKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, std::vector<unsigned> streamsNumOfSets);
41protected:
42    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
43private:
44    const std::vector<unsigned> mStreamsNumOfSets;
45};
46
47class StreamsIntersect : public BlockOrientedKernel {
48public:
49   
50    StreamsIntersect(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned streamsPerSet=1, unsigned inputSets = 1);
51   
52protected:
53   
54    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
55   
56private:
57    const unsigned mStreamsPerSet;
58    const unsigned mInputSets;
59};
60
61}
62   
63#endif
64
Note: See TracBrowser for help on using the repository browser.