mirror of https://github.com/alibaba/MNN.git
				
				
				
			
		
			
				
	
	
		
			32 lines
		
	
	
		
			858 B
		
	
	
	
		
			C++
		
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			858 B
		
	
	
	
		
			C++
		
	
	
	
| //
 | |
| //  CPUBinary.hpp
 | |
| //  MNN
 | |
| //
 | |
| //  Created by MNN on 2018/08/02.
 | |
| //  Copyright © 2018, Alibaba Group Holding Limited
 | |
| //
 | |
| 
 | |
| #ifndef CPUBinary_hpp
 | |
| #define CPUBinary_hpp
 | |
| 
 | |
| #include "core/Execution.hpp"
 | |
| #include "compute/CommonOptFunction.h"
 | |
| namespace MNN {
 | |
| class CPUBinary : public Execution {
 | |
| public:
 | |
|     CPUBinary(Backend *b, MNNBinaryExecute proc) : Execution(b) {
 | |
|         mProc = proc;
 | |
|     }
 | |
|     virtual ~CPUBinary() = default;
 | |
|     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;
 | |
| 
 | |
|     static MNNBinaryExecute selectForFloat(int opType);
 | |
| private:
 | |
|     MNNBinaryExecute mProc;
 | |
|     int mNeedBroadcastIndex = -1;
 | |
|     int mTotalSize;
 | |
| };
 | |
| } // namespace MNN
 | |
| #endif /* CPUBinary_hpp */
 |