mirror of https://github.com/alibaba/MNN.git
40 lines
976 B
C++
40 lines
976 B
C++
//
|
|
// InterpExecution.hpp
|
|
// MNN
|
|
//
|
|
// Created by MNN on 2019/02/02.
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
//
|
|
|
|
#ifndef InterpExecution_hpp
|
|
#define InterpExecution_hpp
|
|
|
|
#include <array>
|
|
#include <memory>
|
|
#include <vector>
|
|
#include "Execution.hpp"
|
|
#include "core/OpenCLBackend.hpp"
|
|
|
|
namespace MNN {
|
|
namespace OpenCL {
|
|
|
|
class InterpExecution : public Execution {
|
|
public:
|
|
InterpExecution(const std::vector<Tensor *> &inputs, const MNN::Op *op, Backend *backend);
|
|
virtual ~InterpExecution() = default;
|
|
|
|
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
|
|
std::vector<uint32_t> interpLocalWS(const std::vector<uint32_t> &gws, const uint32_t maxWorkGroupSize);
|
|
|
|
private:
|
|
bool mAlignCorners;
|
|
cl::Kernel mKernel;
|
|
uint32_t mMaxWorkGroupSize;
|
|
bool mAreadySetArg;
|
|
OpenCLBackend *mOpenCLBackend;
|
|
};
|
|
|
|
} // namespace OpenCL
|
|
} // namespace MNN
|
|
#endif /* InterpExecution_hpp */
|