| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | //
 | 
					
						
							|  |  |  | //  Int8FunctionsOpt.h
 | 
					
						
							|  |  |  | //  MNN
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | //  Created by MNN on 2018/08/15.
 | 
					
						
							|  |  |  | //  Copyright © 2018, Alibaba Group Holding Limited
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef Int8FunctionsOpt_h
 | 
					
						
							|  |  |  | #define Int8FunctionsOpt_h
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <stdint.h>
 | 
					
						
							|  |  |  | #include <stdio.h>
 | 
					
						
							|  |  |  | #include <sys/types.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-10 21:08:55 +08:00
										 |  |  | #if defined(_MSC_VER)
 | 
					
						
							|  |  |  | #include <BaseTsd.h>
 | 
					
						
							|  |  |  | typedef SSIZE_T ssize_t; | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void MNNConvRunForUnitDepthWiseInt8(float* dst, const int8_t* src, const int8_t* weight, size_t fw, size_t fh, | 
					
						
							|  |  |  |                                     size_t weight_y_step, size_t dilateX_step, size_t dilateY_step, const float* scale); | 
					
						
							|  |  |  | void MNNFloat2Int8(const float* src, int8_t* dst, size_t sizeQuad, const float* scalep, ssize_t minValue, | 
					
						
							|  |  |  |                    ssize_t maxValue); | 
					
						
							| 
									
										
										
										
											2020-02-26 09:57:17 +08:00
										 |  |  | void MNNGemmInt8AddBiasScale_16x4_Unit(int8_t* dst, const int8_t* src, const int8_t* weight, const int32_t* bias, | 
					
						
							|  |  |  |                                        const float* scale, size_t src_depth_quad, size_t dst_step, size_t dst_depth_quad); | 
					
						
							|  |  |  | #define GEMM_INT8_UNIT 4
 | 
					
						
							|  |  |  | #define GEMM_INT8_SRC_UNIT 16
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifdef __aarch64__
 | 
					
						
							|  |  |  | #define GEMM_INT8_DST_XUNIT 4
 | 
					
						
							|  |  |  | #else
 | 
					
						
							|  |  |  | #define GEMM_INT8_DST_XUNIT 2
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-22 20:16:29 +08:00
										 |  |  | #ifdef ENABLE_ARMV82
 | 
					
						
							|  |  |  | void MNNGemmInt8AddBiasScale_ARMV82_Unit(int8_t* dst, const int8_t* src, const int8_t* weight, const int32_t* bias, const float* scale, size_t src_depth_quad, size_t dst_step, size_t dst_depth_quad, size_t relu, size_t realDstCount); | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | #endif /* Int8FunctionsOpt_h */
 |