source: icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_block_decoder.h

Last change on this file was 6184, checked in by nmedfort, 7 months ago

Initial version of PipelineKernel? + revised StreamSet? model.

File size: 1.4 KB
Line 
1
2#ifndef ICGREP_LZ4_BLOCK_DECODER_NEW_H
3#define ICGREP_LZ4_BLOCK_DECODER_NEW_H
4
5
6#include "kernels/kernel.h"
7#include <map>
8#include <vector>
9#include <string>
10
11namespace llvm {
12    class Module;
13    class Function;
14    class BasicBlock;
15    class Value;
16}
17
18namespace IDISA { class IDISA_Builder; }
19
20namespace kernel {
21
22class LZ4BlockDecoderKernel : public SegmentOrientedKernel {
23public:
24    LZ4BlockDecoderKernel(const std::unique_ptr<kernel::KernelBuilder> &b,
25                          // arguments
26                          Scalar * hasBlockChecksum, Scalar * headerSize, Scalar * fileSize,
27                          // inputs
28                          StreamSet * byteStream,
29                          // outputs
30                          StreamSet * isCompressed, StreamSet * blockStart, StreamSet * blockEnd);
31protected:
32    void generateDoSegmentMethod(const std::unique_ptr<KernelBuilder> & b) override;
33private:
34    llvm::Value *generateLoadInput(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value *offset);
35
36    void appendOutput(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value *isCompressed, llvm::Value *blockStart, llvm::Value *blockEnd);
37    void generateStoreNumberOutput(const std::unique_ptr<KernelBuilder> &iBuilder, const std::string &outputBufferName, llvm::Value *offset, llvm::Value *value);
38
39};
40
41}
42
43
44#endif //ICGREP_LZ4_BLOCK_DECODER_NEW_H
Note: See TracBrowser for help on using the repository browser.