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

39 lines
969 B
C++
Raw Normal View History

2020-11-05 16:41:56 +08:00
//
// RasterBufExecution.hpp
2020-11-05 16:41:56 +08:00
// MNN
//
// Created by MNN on 2020/05/12.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef MNN_OPENCL_BUFFER_CLOSED
#ifndef RaterBufExecution_hpp
#define RaterBufExecution_hpp
#include "backend/opencl/execution/image/CommonExecution.hpp"
2020-11-05 16:41:56 +08:00
namespace MNN {
namespace OpenCL {
class RasterBufExecution : public CommonExecution {
2020-11-05 16:41:56 +08:00
public:
2021-09-27 11:18:24 +08:00
RasterBufExecution(const std::vector<Tensor *> &inputs, const MNN::Op *op, Backend *backend);
virtual ~RasterBufExecution() = default;
2020-11-05 16:41:56 +08:00
2024-04-19 11:58:21 +08:00
virtual ErrorCode onEncode(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
2020-11-05 16:41:56 +08:00
private:
2023-08-21 14:51:54 +08:00
bool CanCombine(const std::vector<Tensor *> &outputs);
2020-11-05 16:41:56 +08:00
std::map<Tensor*, cl::Buffer *> mTempInput;
cl::Buffer *mTempOutput;
OpenCLBackend *mOpenCLBackend;
bool mNeedZero = false;
bool mFast = false;
};
} // namespace OpenCL
} // namespace MNN
#endif
#endif /* MNN_OPENCL_BUFFER_CLOSED */