MNN/source/backend/opencl/execution/image/ScaleExecution.hpp

35 lines
801 B
C++
Raw Normal View History

2019-04-17 10:49:11 +08:00
//
// ScaleExecution.hpp
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef ScaleExecution_hpp
#define ScaleExecution_hpp
2024-04-19 11:58:21 +08:00
#include "CommonExecution.hpp"
2019-04-17 10:49:11 +08:00
namespace MNN {
namespace OpenCL {
2024-04-19 11:58:21 +08:00
class ScaleExecution : public CommonExecution {
2019-04-17 10:49:11 +08:00
public:
ScaleExecution(const std::vector<Tensor *> &inputs, const MNN::Op *op, Backend *backend);
virtual ~ScaleExecution();
2024-04-19 11:58:21 +08:00
virtual ErrorCode onEncode(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
2019-04-17 10:49:11 +08:00
private:
std::shared_ptr<Tensor> mScale;
std::shared_ptr<Tensor> mBias;
uint32_t mMaxWorkGroupSize;
OpenCLBackend *mOpenCLBackend;
bool mHasBias = false;
};
} // namespace OpenCL
} // namespace MNN
#endif /* ScaleExecution_hpp */