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

Last change on this file since 6020 was 6020, checked in by xwa163, 12 months ago
  1. New version of lz4_swizzled_match_copy kernel with higher performance
  2. Adjust related pipeline code
  3. Remove legacy comments
File size: 1.2 KB
Line 
1
2#ifndef ICGREP_LZ4_MULTIPLE_PDEP_KERNEL_H
3#define ICGREP_LZ4_MULTIPLE_PDEP_KERNEL_H
4
5#include "../kernel.h"
6#include <llvm/IR/Value.h>
7#include <string>
8namespace IDISA { class IDISA_Builder; }
9
10namespace kernel {
11class LZ4MultiplePDEPkernel : public MultiBlockKernel {
12public:
13    LZ4MultiplePDEPkernel(const std::unique_ptr<kernel::KernelBuilder> & kb, unsigned streamCount, unsigned streamSize, unsigned swizzleFactor, unsigned PDEP_width = 64, std::string name = "PDEPdel");
14    bool isCachable() const override { return true; }
15    bool hasSignature() const override { return false; }
16private:
17    const unsigned mSwizzleFactor;
18    const unsigned mPDEPWidth;
19    const unsigned mStreamSize;
20
21    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * const numOfStrides) override;
22    std::vector<llvm::Value *> get_PDEP_masks(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * PDEP_ms_blk,
23                                              const unsigned mask_width);
24    std::vector<llvm::Value *> get_block_popcounts(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * blk,
25                                                   const unsigned field_width);
26};
27}
28
29#endif //ICGREP_LZ4_MULTIPLE_PDEP_KERNEL_H
Note: See TracBrowser for help on using the repository browser.