source: icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_swizzled_match_copy_kernel.h @ 6047

Last change on this file since 6047 was 6026, checked in by xwa163, 16 months ago
  1. Implement SwizzledMultiplePDEPkernel with the same logic as new PDEPkernel, remove LZ4MultiplePDEPkernel, improve the performance
  2. Remove some unnecessary include
  3. Add prefix for some kernels
  4. Remove a legacy kernel
File size: 1.1 KB
Line 
1
2#ifndef ICGREP_LZ4_SWIZZLED_MATCH_COPY_KERNEL2_H
3#define ICGREP_LZ4_SWIZZLED_MATCH_COPY_KERNEL2_H
4
5
6#include "kernels/kernel.h"
7
8namespace IDISA { class IDISA_Builder; }
9
10
11namespace kernel {
12    class LZ4SwizzledMatchCopyKernel: public SegmentOrientedKernel {
13    public:
14        LZ4SwizzledMatchCopyKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned streamCount, unsigned streamSize, unsigned swizzleFactor, unsigned PDEP_width = 64, std::string name = "LZ4SwizzledMatchCopyKernel");
15    protected:
16        void generateDoSegmentMethod(const std::unique_ptr<KernelBuilder> & b) override;
17
18    private:
19
20        const unsigned mSwizzleFactor;
21        const unsigned mPDEPWidth;
22        const unsigned mStreamSize;
23        const unsigned mStreamCount;
24        std::pair<llvm::Value*, llvm::Value*> loadNextMatchOffset(const std::unique_ptr<KernelBuilder> &iBuilder);
25        llvm::Value *advanceUntilNextBit(const std::unique_ptr<KernelBuilder> &iBuilder, std::string inputName,
26                                          llvm::Value *startPos, bool isNextOne);
27    };
28}
29
30#endif //ICGREP_LZ4_SWIZZLED_MATCH_COPY_KERNEL2_H
Note: See TracBrowser for help on using the repository browser.