• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  * @file     arm_math.h
3  * @brief    Public header file for CMSIS DSP Library
4  * @version  V1.10.0
5  * @date     08 July 2021
6  * Target Processor: Cortex-M and Cortex-A cores
7  ******************************************************************************/
8 /*
9  * Copyright (c) 2010-2021 Arm Limited or its affiliates. All rights reserved.
10  *
11  * SPDX-License-Identifier: Apache-2.0
12  *
13  * Licensed under the Apache License, Version 2.0 (the License); you may
14  * not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
21  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  */
25 
26 /**
27    \mainpage CMSIS DSP Software Library
28    *
29    * \section intro Introduction
30    *
31    * This user manual describes the CMSIS DSP software library,
32    * a suite of common compute processing functions for use on Cortex-M and Cortex-A processor
33    * based devices.
34    *
35    * The library is divided into a number of functions each covering a specific category:
36    * - \ref groupMath "Basic math functions"
37    * - \ref groupFastMath "Fast math functions"
38    * - \ref groupCmplxMath "Complex math functions"
39    * - \ref groupFilters "Filtering functions"
40    * - \ref groupMatrix "Matrix functions"
41    * - \ref groupTransforms "Transform functions"
42    * - \ref groupController "Motor control functions"
43    * - \ref groupStats "Statistical functions"
44    * - \ref groupSupport "Support functions"
45    * - \ref groupInterpolation "Interpolation functions"
46    * - \ref groupSVM "Support Vector Machine functions (SVM)"
47    * - \ref groupBayes "Bayes classifier functions"
48    * - \ref groupDistance "Distance functions"
49    * - \ref groupQuaternionMath "Quaternion functions"
50    * - \ref groupWindow "Window functions"
51    *
52    * The library has generally separate functions for operating on 8-bit integers, 16-bit integers,
53    * 32-bit integer and 32-bit floating-point values and 64-bit floating-point values.
54    *
55    * The library is providing vectorized versions of most algorithms for Helium
56    * and of most f32 algorithms for Neon.
57    *
58    * When using a vectorized version, provide a little bit of padding after the end of
59    * a buffer (3 words) because the vectorized code may read a little bit after the end
60    * of a buffer. You don't have to modify your buffers but just ensure that the
61    * end of buffer + padding is not outside of a memory region.
62    *
63    * A Python wrapper is also available with a Python API as close as possible
64    * to the C one. It can be used to start developing and testing an algorithm with NumPy and
65    * SciPy before writing the C version. Is is available on <a href="https://pypi.org/project/cmsisdsp/">PyPI.org</a>.
66    * It can be installed with : pip install cmsisdsp
67    *
68    *
69    * \section using Using the Library
70    *
71    * The library is released in source form. It is strongly advised to compile the library using -Ofast to
72    * have the best performances.
73    *
74    * The library functions are declared in the public file `arm_math.h` which is placed in the `Include` folder.
75    * Simply include this file. If you don't want to include everything, you can also rely
76    * on headers in `Include/dsp` folder and use only what you need.
77    *
78    * \section example Examples
79    *
80    * The library ships with a number of examples which demonstrate how to use the library functions. Please refer to \ref groupExamples.
81    *
82    * \section toolchain Toolchain Support
83    *
84    * The library is now tested on Fast Models building with cmake.
85    * Core M0, M4, M7, M33, M55, A32 are tested.
86    *
87    *
88    * \section preprocessor Preprocessor Macros
89    *
90    * Each library project has different preprocessor macros.
91    *
92    * - `ARM_MATH_BIG_ENDIAN`:
93    *  - Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
94    * .
95    * - `ARM_MATH_MATRIX_CHECK`:
96    *  - Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
97    * .
98    * - `ARM_MATH_ROUNDING`:
99    *  - Define macro ARM_MATH_ROUNDING for rounding on support functions
100    * .
101    * - `ARM_MATH_LOOPUNROLL`:
102    *  - Define macro ARM_MATH_LOOPUNROLL to enable manual loop unrolling in DSP functions
103    * .
104    * - `ARM_MATH_NEON`:
105    *  - Define macro ARM_MATH_NEON to enable Neon versions of the DSP functions.
106    * It is not enabled by default when Neon is available because performances are
107    * dependent on the compiler and target architecture.
108    * .
109    * - `ARM_MATH_NEON_EXPERIMENTAL`:
110    *  - Define macro ARM_MATH_NEON_EXPERIMENTAL to enable experimental Neon versions of
111    * of some DSP functions. Experimental Neon versions currently do not have better
112    * performances than the scalar versions.
113    * .
114    * - `ARM_MATH_HELIUM`:
115    *  - It implies the flags ARM_MATH_MVEF and ARM_MATH_MVEI and ARM_MATH_MVE_FLOAT16.
116    * .
117    * - `ARM_MATH_HELIUM_EXPERIMENTAL`:
118    *  - Only taken into account when ARM_MATH_MVEF, ARM_MATH_MVEI or ARM_MATH_MVE_FLOAT16 are defined.
119    * Enable some vector versions which may have worse performance than scalar
120    * depending on the core / compiler configuration.
121    * .
122    * - `ARM_MATH_MVEF`:
123    *  - Select Helium versions of the f32 algorithms.
124    * It implies ARM_MATH_FLOAT16 and ARM_MATH_MVEI.
125    * .
126    * - `ARM_MATH_MVEI`:
127    *  - Select Helium versions of the int and fixed point algorithms.
128    * .
129    * - `ARM_MATH_MVE_FLOAT16`:
130    *  - MVE Float16 implementations of some algorithms (Requires MVE extension).
131    * .
132    * - `DISABLEFLOAT16`:
133    *  - Disable float16 algorithms when __fp16 is not supported for a
134    * specific compiler / core configuration.
135    * This is only valid for scalar. When vector architecture is
136    * supporting f16 then it can't be disabled.
137    * .
138    * - `ARM_MATH_AUTOVECTORIZE`:
139    *  - With Helium or Neon, disable the use of vectorized code with C intrinsics
140    * and use pure C instead. The vectorization is then done by the compiler.
141    *
142    * \section pack CMSIS-DSP in ARM::CMSIS Pack
143    *
144    * The following files relevant to CMSIS-DSP are present in the <b>ARM::CMSIS</b> Pack directories:
145    * |File/Folder                      |Content                                                                 |
146    * |---------------------------------|------------------------------------------------------------------------|
147    * |\b CMSIS\\Documentation\\DSP     | This documentation                                                     |
148    * |\b CMSIS\\DSP\\Examples          | Example projects demonstrating the usage of the library functions      |
149    * |\b CMSIS\\DSP\\ComputeLibrary    | Small Neon kernels when building on Cortex-A
150    * |\b CMSIS\\DSP\\Include           | include files for using and building the lib
151    * |\b CMSIS\\DSP\\PrivateInclude    | private include files for building the lib                                               |
152    * |\b CMSIS\\DSP\\Source            | source files                                                   |
153    *
154    * \section rev Revision History of CMSIS-DSP
155    * Please refer to \ref ChangeLog_pg.
156    *
157    * \section license License
158    *
159    * The CMSIS-DSP is provided free of charge under the <a href="LICENSE">Apache 2.0 License</a>.
160    */
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 /**
173  * @defgroup groupExamples Examples
174  */
175 
176 
177 
178 
179 
180 #ifndef _ARM_MATH_H
181 #define _ARM_MATH_H
182 
183 
184 #include "arm_math_types.h"
185 #include "arm_math_memory.h"
186 
187 #include "dsp/none.h"
188 #include "dsp/utils.h"
189 
190 #include "dsp/basic_math_functions.h"
191 #include "dsp/interpolation_functions.h"
192 #include "dsp/bayes_functions.h"
193 #include "dsp/matrix_functions.h"
194 #include "dsp/complex_math_functions.h"
195 #include "dsp/statistics_functions.h"
196 #include "dsp/controller_functions.h"
197 #include "dsp/support_functions.h"
198 #include "dsp/distance_functions.h"
199 #include "dsp/svm_functions.h"
200 #include "dsp/fast_math_functions.h"
201 #include "dsp/transform_functions.h"
202 #include "dsp/filtering_functions.h"
203 #include "dsp/quaternion_math_functions.h"
204 #include "dsp/window_functions.h"
205 
206 
207 
208 #ifdef   __cplusplus
209 extern "C"
210 {
211 #endif
212 
213 
214 
215 
216 //#define TABLE_SPACING_Q31     0x400000
217 //#define TABLE_SPACING_Q15     0x80
218 
219 
220 
221 
222 
223 #ifdef   __cplusplus
224 }
225 #endif
226 
227 
228 #endif /* _ARM_MATH_H */
229 
230 /**
231  *
232  * End of file.
233  */
234