forked from alibaba/MNN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVulkanResize.hpp
More file actions
32 lines (28 loc) · 963 Bytes
/
Copy pathVulkanResize.hpp
File metadata and controls
32 lines (28 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// VulkanResize.hpp
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef VulkanResize_hpp
#define VulkanResize_hpp
#include "VulkanBasicExecution.hpp"
namespace MNN {
class VulkanResize : public VulkanBasicExecution {
public:
VulkanResize(Backend* bn, float xScale, float yScale, int resizeType=2);
virtual ~VulkanResize();
ErrorCode onEncode(const std::vector<Tensor*>& inputs, const std::vector<Tensor*>& outputs,
const VulkanCommandPool::Buffer* cmdBuffer) override;
ErrorCode encodeImpl(Tensor* input, Tensor* output, float xScale, float yScale,
const VulkanCommandPool::Buffer* cmdBuffer);
private:
float mXScale;
float mYScale;
std::shared_ptr<VulkanBuffer> mParamBuffer;
const VulkanPipeline* mVulkanResizePipeline;
std::shared_ptr<VulkanPipeline::DescriptorSet> mDescriptorSet;
};
} // namespace MNN
#endif