source: icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_match_copy_kernel.h @ 5864

Last change on this file since 5864 was 5864, checked in by xwa163, 16 months ago

Add LZ4D extract deposit related kernel, target and test cases

File size: 1.6 KB
Line 
1//
2//
3
4#ifndef ICGREP_LZ4_MATCH_COPY_KERNEL_H
5#define ICGREP_LZ4_MATCH_COPY_KERNEL_H
6
7#include "kernels/kernel.h"
8
9namespace IDISA { class IDISA_Builder; }
10
11namespace kernel {
12    class LZ4MatchCopyKernel: public MultiBlockKernel {
13    public:
14        LZ4MatchCopyKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder);
15    protected:
16        void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value * const numOfStrides) override;
17//        void generateDoBlockMethod(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
18    private:
19        llvm::Value* generateLoadCircularInput(const std::unique_ptr<KernelBuilder> &iBuilder, std::string inputBufferName, llvm::Value* offset, llvm::Type* pointerType);
20        llvm::Value* generateLoadCircularOutput(const std::unique_ptr<KernelBuilder> &iBuilder, std::string inputBufferName, llvm::Value* offset, llvm::Type* pointerType);
21        void generateStoreCircularOutput(const std::unique_ptr<KernelBuilder> &iBuilder, std::string outputBufferName, llvm::Value* offset, llvm::Type* pointerType, llvm::Value* value);
22
23        size_t getInputBufferSize(const std::unique_ptr<KernelBuilder> &iBuilder, std::string bufferName);
24        size_t getOutputBufferSize(const std::unique_ptr<KernelBuilder> &iBuilder, std::string bufferName);
25        void generateOutputCopy(const std::unique_ptr<KernelBuilder> &iBuilder);
26        llvm::Value* generateMatchCopy(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value* currentProcessIndex);
27    };
28}
29
30
31
32#endif //ICGREP_LZ4_MATCH_COPY_KERNEL_H
Note: See TracBrowser for help on using the repository browser.