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

Last change on this file since 5966 was 5966, checked in by xwa163, 12 months ago

Convert lz4_swizzled_match_copy_kernel to SegmentOrientedKernel?

File size: 1.2 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 final: public SegmentOrientedKernel {
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        void generateDoSegmentMethod(const std::unique_ptr<KernelBuilder> & b) override;
20    private:
21
22        const unsigned mSwizzleFactor;
23        const unsigned mPDEPWidth;
24        const unsigned mStreamSize;
25        const unsigned mStreamCount;
26
27
28
29        void generateOutputCopy(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value* outputBlocks);
30
31        llvm::Value* mIsFinalBlock;
32        llvm::Value* loadInt64NumberInput(const std::unique_ptr<KernelBuilder> &iBuilder, std::string bufferName, llvm::Value* offset);
33    };
34}
35
36
37
38
39#endif //ICGREP_LZ4_SWIZZLED_MATCH_COPY_KERNEL_H
Note: See TracBrowser for help on using the repository browser.