2019-04-17 10:49:11 +08:00
|
|
|
//
|
|
|
|
// EltwiseExecution.hpp
|
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2019/01/31.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef EltwiseExecution_hpp
|
|
|
|
#define EltwiseExecution_hpp
|
|
|
|
|
|
|
|
#include "CommonExecution.hpp"
|
|
|
|
|
|
|
|
namespace MNN {
|
|
|
|
namespace OpenCL {
|
|
|
|
|
|
|
|
class EltwiseExecution : public CommonExecution {
|
|
|
|
public:
|
2024-04-19 11:58:21 +08:00
|
|
|
EltwiseExecution(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs, const std::string &compute, const MNN::Op *op, Backend *backend);
|
2019-04-17 10:49:11 +08:00
|
|
|
virtual ~EltwiseExecution() = default;
|
|
|
|
|
2021-04-28 18:02:10 +08:00
|
|
|
uint32_t realSize(const Tensor* tensor);
|
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:
|
2020-07-23 10:35:12 +08:00
|
|
|
std::string mCompute;
|
2020-11-05 16:41:56 +08:00
|
|
|
std::shared_ptr<Tensor> mTempOutput;
|
2021-04-28 18:02:10 +08:00
|
|
|
|
2024-04-19 11:58:21 +08:00
|
|
|
std::vector<uint32_t> mMaxWorkGroupSize;
|
2019-04-17 10:49:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace OpenCL
|
|
|
|
} // namespace MNN
|
|
|
|
#endif /* EltwiseExecution_hpp */
|