source: icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_swizzled_match_copy_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.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);
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.