forked from alibaba/MNN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScaleExecution.hpp
More file actions
41 lines (34 loc) · 1.02 KB
/
Copy pathScaleExecution.hpp
File metadata and controls
41 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// ScaleExecution.hpp
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef ScaleExecution_hpp
#define ScaleExecution_hpp
#include <array>
#include <memory>
#include <vector>
#include "Execution.hpp"
#include "core/OpenCLBackend.hpp"
namespace MNN {
namespace OpenCL {
class ScaleExecution : public Execution {
public:
ScaleExecution(const std::vector<Tensor *> &inputs, const MNN::Op *op, Backend *backend);
virtual ~ScaleExecution();
virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
private:
std::shared_ptr<Tensor> mScale;
std::shared_ptr<Tensor> mBias;
cl::Kernel mKernel;
uint32_t mMaxWorkGroupSize;
bool mAreadySetArg;
OpenCLBackend *mOpenCLBackend;
bool mHasBias = false;
};
} // namespace OpenCL
} // namespace MNN
#endif /* ScaleExecution_hpp */