source: icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_swizzled_match_copy_kernel.h @ 5906

Last change on this file since 5906 was 5906, checked in by xwa163, 11 months ago

Implement swizzled match copy kernel, which can do match copy in swizzled bitstream form

File size: 1.1 KB
Line 
1//
2// Created by wxy325 on 2018/3/9.
3//
4
5#ifndef ICGREP_LZ4_SWIZZLED_MATCH_COPY_KERNEL_H
6#define ICGREP_LZ4_SWIZZLED_MATCH_COPY_KERNEL_H
7
8#include "kernels/kernel.h"
9
10namespace IDISA { class IDISA_Builder; }
11
12
13namespace kernel {
14    class LZ4SwizzledMatchCopyKernel: public MultiBlockKernel {
15    public:
16        LZ4SwizzledMatchCopyKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned streamCount, unsigned streamSize, unsigned swizzleFactor, unsigned PDEP_width = 64);
17    protected:
18        void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value * const numOfStrides) override;
19    private:
20
21        const unsigned mSwizzleFactor;
22        const unsigned mPDEPWidth;
23        const unsigned mStreamSize;
24        const unsigned mStreamCount;
25
26
27
28        void generateOutputCopy(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value* outputBlocks);
29
30        llvm::Value* getMaximumMatchCopyBlock(const std::unique_ptr<KernelBuilder> &iBuilder);
31        llvm::Value* mIsFinalBlock;
32    };
33}
34
35
36
37
38#endif //ICGREP_LZ4_SWIZZLED_MATCH_COPY_KERNEL_H
Note: See TracBrowser for help on using the repository browser.