source: icGREP/icgrep-devel/icgrep/kernels/p2s_kernel.h @ 6132

Last change on this file since 6132 was 6132, checked in by xwa163, 8 months ago
  1. More experiment on lz4 grep
  2. Improve performance of lzparabix grep
File size: 2.5 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 P2S_KERNEL_H
6#define P2S_KERNEL_H
7
8#include <cc/alphabet.h>
9#include "kernel.h"  // for KernelBuilder
10
11namespace IDISA { class IDISA_Builder; }
12
13namespace kernel {
14
15    class P2S4StreamByPDEP final : public BlockOrientedKernel{
16    public:
17        P2S4StreamByPDEP(const std::unique_ptr<kernel::KernelBuilder> & b);
18    private:
19        void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
20    };
21
22class P2SKernel final : public BlockOrientedKernel {
23public:
24    P2SKernel(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian, std::string prefix = "", unsigned numOfStreams = 8);
25    bool isCachable() const override { return true; }
26    bool hasSignature() const override { return false; }
27private:
28    cc::BitNumbering mBasisSetNumbering;
29    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
30    unsigned mNumOfStreams;
31};
32
33class P2SKernelWithCompressedOutput final : public BlockOrientedKernel {
34public:
35    P2SKernelWithCompressedOutput(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
36    bool isCachable() const override { return true; }
37    bool hasSignature() const override { return false; }
38private:
39    cc::BitNumbering mBasisSetNumbering;
40    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
41};
42
43class P2S16Kernel final : public BlockOrientedKernel {
44public:
45    P2S16Kernel(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
46    bool isCachable() const override { return true; }
47    bool hasSignature() const override { return false; }
48private:
49    cc::BitNumbering mBasisSetNumbering;
50    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
51};
52   
53class P2S16KernelWithCompressedOutput final : public BlockOrientedKernel {
54public:
55    P2S16KernelWithCompressedOutput(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
56    bool isCachable() const override { return true; }
57    bool hasSignature() const override { return false; }
58private:
59    cc::BitNumbering mBasisSetNumbering;
60    void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & b) override;
61};
62   
63}
64
65#endif
Note: See TracBrowser for help on using the repository browser.