| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | //
 | 
					
						
							|  |  |  | //  GLConvolutionDepthwise.h
 | 
					
						
							|  |  |  | //  MNN
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | //  Created by MNN on 2019/01/31.
 | 
					
						
							|  |  |  | //  Copyright © 2018, Alibaba Group Holding Limited
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef MNNDEMO_GLCONVOLUTIONDEPTHWISE_H
 | 
					
						
							|  |  |  | #define MNNDEMO_GLCONVOLUTIONDEPTHWISE_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-27 22:16:57 +08:00
										 |  |  | #include "core/Execution.hpp"
 | 
					
						
							| 
									
										
										
										
											2020-01-15 13:33:47 +08:00
										 |  |  | #include "backend/opengl/GLConvolution.hpp"
 | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | #include "MNN_generated.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace MNN { | 
					
						
							| 
									
										
										
										
											2019-05-24 11:26:54 +08:00
										 |  |  | namespace OpenGL { | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | class GLConvolutionDepthwise : public GPUConvolution { | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2019-05-24 11:26:54 +08:00
										 |  |  |     GLConvolutionDepthwise(const std::vector<Tensor *> &inputs, const Op *op, Backend *b); | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  |     virtual ~GLConvolutionDepthwise(); | 
					
						
							|  |  |  |     virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override; | 
					
						
							|  |  |  |     virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     std::shared_ptr<GLTexture> mKernelTexture; | 
					
						
							|  |  |  |     std::shared_ptr<GLSSBOBuffer> mBiasBuffer; | 
					
						
							|  |  |  |     std::shared_ptr<GLProgram> mProgram; | 
					
						
							|  |  |  |     std::function<void()> mSetUniform; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-24 11:26:54 +08:00
										 |  |  | } // namespace OpenGL
 | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | } // namespace MNN
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // MNNDEMO_GLCONVOLUTION_H
 |