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

Last change on this file since 6004 was 6002, checked in by nmedfort, 17 months ago

Bug fix

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
9
10#include <pablo/pablo_kernel.h>
11
12namespace IDISA { class IDISA_Builder; }  // lines 14-14
13namespace llvm { class Value; }
14
15namespace kernel {
16
17class S2PKernel final : public MultiBlockKernel {
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    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * const numOfStrides) override;
24private:
25    bool mAligned;
26};
27
28class S2P_PabloKernel final : public pablo::PabloKernel {
29public:
30    S2P_PabloKernel(const std::unique_ptr<KernelBuilder> & b, unsigned codeUnitWidth = 8);
31    bool isCachable() const override { return true; }
32    bool hasSignature() const override { return false; }
33protected:
34    void generatePabloMethod() override;
35    unsigned mCodeUnitWidth;
36};
37
38}
39#endif
Note: See TracBrowser for help on using the repository browser.