source: icGREP/icgrep-devel/icgrep/kernels/lzparabix/decoder/LZParabixBitStreamAioKernel.h @ 6133

Last change on this file since 6133 was 6133, checked in by xwa163, 12 months ago
  1. Add sourceCC in multiplexed CC
  2. Remove workaround FakeBasisBits? from ICGrep
  3. Implement Swizzled version of LZParabix
  4. Init checkin for SwizzleByGather? Kernel
File size: 1.6 KB
Line 
1
2#ifndef ICGREP_LZPARABIXBITSTREAMAIOKERNEL_H
3#define ICGREP_LZPARABIXBITSTREAMAIOKERNEL_H
4
5#include "kernels/lzparabix/decoder/LZParabixAioBaseKernel.h"
6namespace llvm {
7    class Module;
8    class Function;
9    class BasicBlock;
10    class Value;
11}
12
13namespace IDISA { class IDISA_Builder; }
14
15namespace kernel {
16    class LZParabixBitStreamAioKernel: public LZParabixAioBaseKernel {
17    public:
18        LZParabixBitStreamAioKernel(const std::unique_ptr<kernel::KernelBuilder> &b, std::vector<unsigned> numsOfBitStreams = {8});
19    protected:
20        virtual void initDoSegmentMethod(const std::unique_ptr<KernelBuilder> &b) override;
21        virtual llvm::Value* isAllItemAvailable(const std::unique_ptr<KernelBuilder> &b, llvm::Value* literalLength) override;
22        virtual void doLiteralCopy(const std::unique_ptr<KernelBuilder> &b, llvm::Value *cursorPos, llvm::Value *literalLength) override;
23        virtual void doMatchCopy(const std::unique_ptr<KernelBuilder> &b, llvm::Value* cursorPos, llvm::Value* matchOffset, llvm::Value* matchMask) override;
24        virtual void setProducedOutputItemCount(const std::unique_ptr<KernelBuilder> &b, llvm::Value* c) override;
25
26        virtual llvm::Value* getProcessedInputItemCount(const std::unique_ptr<KernelBuilder> &b) override;
27        virtual void setProcessedInputItemCount(const std::unique_ptr<KernelBuilder> &b, llvm::Value* c) override;
28
29    private:
30        std::vector<unsigned> mNumsOfBitStreams;
31
32        void appendBitStreamOutput(const std::unique_ptr<KernelBuilder> &b, std::vector<llvm::Value*>& extractedValues, llvm::Value* valueLength);
33    };
34}
35
36
37
38#endif //ICGREP_LZPARABIXBITSTREAMAIOKERNEL_H
Note: See TracBrowser for help on using the repository browser.