source: icGREP/icgrep-devel/icgrep/kernels/lz4/aio/lz4_bitstream_aio.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: 1.4 KB
Line 
1
2#ifndef ICGREP_LZ4_BITSTREAM_AIO_H
3#define ICGREP_LZ4_BITSTREAM_AIO_H
4
5#include "kernels/lz4/aio/lz4_sequential_aio_base.h"
6#include <vector>
7
8namespace kernel {
9    class LZ4BitStreamAioKernel : public LZ4SequentialAioBaseKernel {
10    public:
11        LZ4BitStreamAioKernel(const std::unique_ptr<kernel::KernelBuilder> &b, std::vector<unsigned> numsOfBitStreams = {8}, unsigned blockSize = 4 * 1024 * 1024);
12    protected:
13        virtual void doLiteralCopy(const std::unique_ptr<KernelBuilder> &b, llvm::Value *literalStart,
14                                   llvm::Value *literalLength, llvm::Value* blockStart) override;
15        virtual void doMatchCopy(const std::unique_ptr<KernelBuilder> &b, llvm::Value *matchOffset,
16                                 llvm::Value *matchLength) override;
17        virtual void setProducedOutputItemCount(const std::unique_ptr<KernelBuilder> &b, llvm::Value* produced) override;
18        virtual void storePendingOutput(const std::unique_ptr<KernelBuilder> &b) override;
19
20    private:
21        std::vector<unsigned> mNumsOfBitStreams;
22        void initPendingOutputScalar(const std::unique_ptr<kernel::KernelBuilder> &b);
23        void appendBitStreamOutput(const std::unique_ptr<KernelBuilder> &b, std::vector<llvm::Value*>& extractedValues, llvm::Value* valueLength);
24
25
26        void storePendingOutput_BitStream(const std::unique_ptr<KernelBuilder> &b);
27    };
28}
29
30
31
32
33#endif //ICGREP_LZ4_BITSTREAM_AIO_H
Note: See TracBrowser for help on using the repository browser.