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

Last change on this file since 5769 was 5690, checked in by cameron, 20 months ago

Multiblock version of s2p - disabled for now

File size: 1.1 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
9namespace IDISA { class IDISA_Builder; }  // lines 14-14
10namespace llvm { class Value; }
11//#define S2P_MULTIBLOCK
12namespace kernel {
13#ifdef S2P_MULTIBLOCK
14    class S2PKernel final : public MultiBlockKernel {
15#else
16    class S2PKernel final : public BlockOrientedKernel {
17#endif
18public:
19    S2PKernel(const std::unique_ptr<kernel::KernelBuilder> & b, bool aligned = true);
20    bool isCachable() const override { return true; }
21    bool hasSignature() const override { return false; }
22protected:
23#ifdef S2P_MULTIBLOCK
24    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb) override;
25#else
26    void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
27    void generateFinalBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * remainingBytes) override;
28#endif
29private:
30    bool mAligned;
31};
32
33}
34#endif
Note: See TracBrowser for help on using the repository browser.