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

Last change on this file since 5895 was 5895, checked in by xwa163, 15 months ago
  1. Fix match copy kernel in large file for new infrastructure
  2. Enable testing for full LZ4 decode pipeline
File size: 1.6 KB
RevLine 
[5864]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);
[5895]25        void generateOutputCopy(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value* outputBlocks);
26
27        llvm::Value* getMaximumMatchCopyBlock(const std::unique_ptr<KernelBuilder> &iBuilder);
28        llvm::Value* mIsFinalBlock;
[5864]29    };
30}
31
32
33
34#endif //ICGREP_LZ4_MATCH_COPY_KERNEL_H
Note: See TracBrowser for help on using the repository browser.