1 // 2 // ReluBufExecution.hpp 3 // MNN 4 // 5 // Created by MNN on 2019/01/31. 6 // Copyright © 2018, Alibaba Group Holding Limited 7 // 8 9 #ifndef MNN_OPENCL_BUFFER_CLOSED 10 11 #ifndef ReluBufExecution_hpp 12 #define ReluBufExecution_hpp 13 14 #include "backend/opencl/execution/image/CommonExecution.hpp" 15 namespace MNN { 16 namespace OpenCL { 17 18 class ReluBufExecution : public CommonExecution { 19 public: 20 ReluBufExecution(const std::vector<Tensor *> &inputs, const MNN::Op *op, Backend *backend); 21 virtual ~ReluBufExecution(); 22 23 virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override; 24 25 private: 26 std::shared_ptr<Tensor> mPreluParam; 27 cl::Kernel mKernel; 28 uint32_t mMaxWorkGroupSize; 29 OpenCLBackend *mOpenCLBackend; 30 }; 31 32 } // namespace OpenCL 33 } // namespace MNN 34 #endif /* ReluExecution_hpp */ 35 #endif /* MNN_OPENCL_BUFFER_CLOSED */ 36