forked from alibaba/MNN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVulkanMatrixMultier.hpp
More file actions
52 lines (41 loc) · 1.21 KB
/
Copy pathVulkanMatrixMultier.hpp
File metadata and controls
52 lines (41 loc) · 1.21 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// VulkanMatrixMultier.hpp
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef VulkanMatrixMultier_hpp
#define VulkanMatrixMultier_hpp
#include <stdio.h>
#include "VulkanBasicExecution.hpp"
namespace MNN {
class VulkanMatrixMultier : public NonCopyable {
public:
virtual ~VulkanMatrixMultier();
VulkanMatrixMultier(VulkanBackend* backend, const float* B, int w, int h, int c = 1);
void prepare(int srcHeight);
void compute(const VulkanCommandPool::Buffer* commandBuffer) const;
inline const VulkanImage* source() const {
return mSource.get();
}
inline const VulkanImage* dest() const {
return mDest.get();
}
private:
const VulkanPipeline* mPipeline;
std::shared_ptr<VulkanPipeline::DescriptorSet> mDescriptorSet;
VulkanBackend* mBackend;
std::shared_ptr<VulkanImage> mKernel;
const VulkanSampler* mSampler;
std::shared_ptr<VulkanBuffer> mConstBuffer;
std::shared_ptr<VulkanImage> mDest;
std::shared_ptr<VulkanImage> mSource;
int mWidth;
int mHeight;
int mDepth;
int mOutputWidth = 0;
int mOutputHeight = 0;
};
} // namespace MNN
#endif /* VulkanMatrixMultier_hpp */