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

Last change on this file since 6112 was 6112, checked in by xwa163, 10 months ago

Remove S2PByPextKernel

File size: 1.9 KB
Line 
1/*
2 *  Copyright (c) 2018 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#include <cc/alphabet.h>
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, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian, 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    cc::BitNumbering mBasisSetNumbering;
27    bool mAligned;
28};
29
30class S2P_21Kernel final : public MultiBlockKernel {
31public:
32    S2P_21Kernel(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
33    bool isCachable() const override { return true; }
34    bool hasSignature() const override { return false; }
35protected:
36    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * const numOfStrides) override;
37    cc::BitNumbering mBasisSetNumbering;
38};
39
40class S2P_PabloKernel final : public pablo::PabloKernel {
41public:
42    S2P_PabloKernel(const std::unique_ptr<KernelBuilder> & b, unsigned codeUnitWidth = 8, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
43    bool isCachable() const override { return true; }
44    bool hasSignature() const override { return false; }
45protected:
46    void generatePabloMethod() override;
47    unsigned mCodeUnitWidth;
48    cc::BitNumbering mBasisSetNumbering;
49};
50
51
52}
53#endif
Note: See TracBrowser for help on using the repository browser.