MNN/source/backend/opencl/execution/buffer/ReluBufExecution.hpp

36 lines
881 B
C++
Raw Normal View History

2019-04-17 10:49:11 +08:00
//
// ReluBufExecution.hpp
2019-04-17 10:49:11 +08:00
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef MNN_OPENCL_BUFFER_CLOSED
2019-04-17 10:49:11 +08:00
#ifndef ReluBufExecution_hpp
#define ReluBufExecution_hpp
#include "backend/opencl/execution/image/CommonExecution.hpp"
2019-04-17 10:49:11 +08:00
namespace MNN {
namespace OpenCL {
class ReluBufExecution : public CommonExecution {
2019-04-17 10:49:11 +08:00
public:
ReluBufExecution(const std::vector<Tensor *> &inputs, const MNN::Op *op, Backend *backend);
virtual ~ReluBufExecution();
2019-04-17 10:49:11 +08:00
virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
private:
std::shared_ptr<Tensor> mPreluParam;
cl::Kernel mKernel;
uint32_t mMaxWorkGroupSize;
OpenCLBackend *mOpenCLBackend;
2019-04-17 10:49:11 +08:00
};
} // namespace OpenCL
} // namespace MNN
#endif /* ReluExecution_hpp */
#endif /* MNN_OPENCL_BUFFER_CLOSED */