forked from alibaba/MNN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVulkanElementWise.hpp
More file actions
32 lines (26 loc) · 956 Bytes
/
Copy pathVulkanElementWise.hpp
File metadata and controls
32 lines (26 loc) · 956 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
//
// VulkanElementWise.hpp
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef VulkanElementWise_hpp
#define VulkanElementWise_hpp
#include <stdio.h>
#include "VulkanBasicExecution.hpp"
namespace MNN {
class VulkanElementWise : public Execution {
public:
VulkanElementWise(EltwiseType type, Backend *bn);
virtual ~VulkanElementWise();
virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
private:
std::shared_ptr<VulkanBuffer> mConstBuffer;
const VulkanPipeline *mElemenWisePipeline;
std::vector<std::shared_ptr<VulkanPipeline::DescriptorSet>> mSubDescriptorSets;
std::vector<std::shared_ptr<VulkanCommandPool::Buffer>> mBuffers;
};
} // namespace MNN
#endif /* VulkanElementWise_hpp */