Преглед изворни кода

CMSIS-DSP: Moved definition of Q31,Q15 and Q7 bounds to arm_math.h

Christophe Favergeon пре 6 година
родитељ
комит
69e3bbc705

+ 0 - 8
CMSIS/DSP/Include/arm_helium_utils.h

@@ -79,14 +79,6 @@ Definitions available for MVEI only
 ***************************************/
 #if defined (ARM_MATH_HELIUM) || defined(ARM_MATH_MVEI)
 
-#include <limits.h>
-
-#define Q31_MAX   LONG_MAX
-#define Q15_MAX   SHRT_MAX
-#define Q7_MAX    SCHAR_MAX
-#define Q31_MIN   LONG_MIN
-#define Q15_MIN   SHRT_MIN
-#define Q7_MIN    SCHAR_MIN
 
 #include "arm_common_tables.h"
 

+ 11 - 3
CMSIS/DSP/Include/arm_math.h

@@ -377,9 +377,17 @@ extern "C"
 
 
 
-#include "string.h"
-#include "math.h"
-#include "float.h"
+#include <string.h>
+#include <math.h>
+#include <float.h>
+#include <limits.h>
+
+#define Q31_MAX   LONG_MAX
+#define Q15_MAX   SHRT_MAX
+#define Q7_MAX    SCHAR_MAX
+#define Q31_MIN   LONG_MIN
+#define Q15_MIN   SHRT_MIN
+#define Q7_MIN    SCHAR_MIN
 
 /* evaluate ARM DSP feature */
 #if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))

+ 0 - 5
CMSIS/NN/Include/arm_nnsupportfunctions.h

@@ -40,11 +40,6 @@ extern    "C"
 
 #define LEFT_SHIFT(_shift)  (_shift > 0 ? _shift : 0)
 #define RIGHT_SHIFT(_shift) (_shift > 0 ? 0 : -_shift)
-#define Q31_MIN ((q31_t)(0x80000000L))
-#define Q31_MAX ((q31_t)(0x7FFFFFFFL))
-#define Q7_MIN ((q7_t)(0x80))
-#define Q7_MAX ((q7_t)(0x7F))
-
 
 #define MAX(A,B) ((A) > (B) ? (A) : (B))
 #define MIN(A,B) ((A) < (B) ? (A) : (B))