source: icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_multiple_pdep_kernel.h @ 5905

Last change on this file since 5905 was 5873, checked in by xwa163, 18 months ago
  1. Implement LZ4MultiplePdepKernel, which can do PDEP for more than one input streamset
  2. Add attributed Swizzled in StreamSet?, copy at least one whole block when doing temporary buffer copy for Swizzled InputStreamSet?
  3. Bug fixing for character_deposit pipeline
  4. Add more test files for character_deposit pipeline
File size: 1.3 KB
Line 
1//
2// Created by wxy325 on 2018/2/9.
3//
4
5#ifndef ICGREP_LZ4_MULTIPLE_PDEP_KERNEL_H
6#define ICGREP_LZ4_MULTIPLE_PDEP_KERNEL_H
7
8#include "../kernel.h"
9#include <llvm/IR/Value.h>
10#include <string>
11namespace IDISA { class IDISA_Builder; }
12
13namespace kernel {
14class LZ4MultiplePDEPkernel : public MultiBlockKernel {
15public:
16    LZ4MultiplePDEPkernel(const std::unique_ptr<kernel::KernelBuilder> & kb, unsigned streamCount, unsigned streamSize, unsigned swizzleFactor, unsigned PDEP_width = 64, std::string name = "PDEPdel");
17    bool isCachable() const override { return true; }
18    bool hasSignature() const override { return false; }
19private:
20    const unsigned mSwizzleFactor;
21    const unsigned mPDEPWidth;
22    const unsigned mStreamSize;
23
24    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * const numOfStrides) override;
25    std::vector<llvm::Value *> get_PDEP_masks(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * PDEP_ms_blk,
26                                              const unsigned mask_width);
27    std::vector<llvm::Value *> get_block_popcounts(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * blk,
28                                                   const unsigned field_width);
29};
30}
31
32#endif //ICGREP_LZ4_MULTIPLE_PDEP_KERNEL_H
Note: See TracBrowser for help on using the repository browser.