| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | //
 | 
					
						
							|  |  |  | //  CPURuntime.hpp
 | 
					
						
							|  |  |  | //  MNN
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | //  Created by MNN on 2018/08/31.
 | 
					
						
							|  |  |  | //  Copyright © 2018, Alibaba Group Holding Limited
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | #ifndef CPURuntime_hpp
 | 
					
						
							|  |  |  | #define CPURuntime_hpp
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-11 17:17:13 +08:00
										 |  |  | #include <stdint.h>
 | 
					
						
							| 
									
										
										
										
											2024-07-22 19:51:53 +08:00
										 |  |  | #include <vector>
 | 
					
						
							| 
									
										
										
										
											2021-06-11 17:17:13 +08:00
										 |  |  | #include "core/Macro.h"
 | 
					
						
							| 
									
										
										
										
											2024-07-22 19:51:53 +08:00
										 |  |  | struct CPUGroup { | 
					
						
							|  |  |  |     uint32_t minFreq; | 
					
						
							|  |  |  |     uint32_t maxFreq; | 
					
						
							|  |  |  |     std::vector<int> ids; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | struct MNNCPUInfo { | 
					
						
							| 
									
										
										
										
											2020-03-22 20:16:29 +08:00
										 |  |  |     bool fp16arith; | 
					
						
							|  |  |  |     bool dot; | 
					
						
							| 
									
										
										
										
											2022-10-30 08:44:24 +08:00
										 |  |  |     bool i8mm; | 
					
						
							| 
									
										
										
										
											2024-07-22 19:51:53 +08:00
										 |  |  |     bool sve2; | 
					
						
							|  |  |  |     std::vector<CPUGroup> groups; | 
					
						
							|  |  |  |     int cpuNumber = 0; | 
					
						
							| 
									
										
										
										
											2020-03-22 20:16:29 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-22 19:51:53 +08:00
										 |  |  | int MNNSetSchedAffinity(const int* cpuIDs, int size); | 
					
						
							|  |  |  | int MNNGetCurrentPid(); | 
					
						
							|  |  |  | const MNNCPUInfo* MNNGetCPUInfo(); | 
					
						
							| 
									
										
										
										
											2020-03-22 20:16:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | #endif /* CPUInfo_hpp */
 |