source: icGREP/icgrep-devel/icgrep/kernels/s2p_kernel.h @ 6034

Last change on this file since 6034 was 6026, checked in by xwa163, 17 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.2 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef S2P_KERNEL_H
6#define S2P_KERNEL_H
7
8#include "kernel.h"  // for KernelBuilder
9
10#include <pablo/pablo_kernel.h>
11#include <string>
12
13namespace IDISA { class IDISA_Builder; }  // lines 14-14
14namespace llvm { class Value; }
15
16namespace kernel {
17
18class S2PKernel final : public MultiBlockKernel {
19public:
20    S2PKernel(const std::unique_ptr<kernel::KernelBuilder> & b, bool aligned = true, std::string prefix = "");
21    bool isCachable() const override { return true; }
22    bool hasSignature() const override { return false; }
23protected:
24    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * const numOfStrides) override;
25private:
26    bool mAligned;
27};
28
29class S2P_PabloKernel final : public pablo::PabloKernel {
30public:
31    S2P_PabloKernel(const std::unique_ptr<KernelBuilder> & b, unsigned codeUnitWidth = 8);
32    bool isCachable() const override { return true; }
33    bool hasSignature() const override { return false; }
34protected:
35    void generatePabloMethod() override;
36    unsigned mCodeUnitWidth;
37};
38
39}
40#endif
Note: See TracBrowser for help on using the repository browser.