/ Drivers / CMSIS / DSP / Include / arm_math.h
arm_math.h
  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 signal 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     * - Basic math functions
 37     * - Fast math functions
 38     * - Complex math functions
 39     * - Filtering functions
 40     * - Matrix functions
 41     * - Transform functions
 42     * - Motor control functions
 43     * - Statistical functions
 44     * - Support functions
 45     * - Interpolation functions
 46     * - Support Vector Machine functions (SVM)
 47     * - Bayes classifier functions
 48     * - Distance functions
 49     * - Quaternion functions
 50     *
 51     * The library has generally separate functions for operating on 8-bit integers, 16-bit integers,
 52     * 32-bit integer and 32-bit floating-point values.
 53     *
 54     * The library is providing vectorized versions of most algorthms for Helium
 55     * and of most f32 algorithms for Neon.
 56     *
 57     * When using a vectorized version, provide a little bit of padding after the end of
 58     * a buffer (3 words) because the vectorized code may read a little bit after the end
 59     * of a buffer. You don't have to modify your buffers but just ensure that the
 60     * end of buffer + padding is not outside of a memory region.
 61     *
 62     * \section using Using the Library
 63     *
 64     * The library is released in source form. It is strongly advised to compile the library using -Ofast to
 65     * have the best performances.
 66     *
 67     * The library functions are declared in the public file <code>arm_math.h</code> which is placed in the <code>Include</code> folder.
 68     * Simply include this file. If you don't want to include everything, you can also rely
 69     * on headers in Include/dsp folder and use only what you need.
 70     *
 71     * \section example Examples
 72     *
 73     * The library ships with a number of examples which demonstrate how to use the library functions.
 74     *
 75     * \section toolchain Toolchain Support
 76     *
 77     * The library is now tested on Fast Models building with cmake.
 78     * Core M0, M4, M7, M33, M55, A32 are tested.
 79     *
 80     *
 81     * \section preprocessor Preprocessor Macros
 82     *
 83     * Each library project have different preprocessor macros.
 84     *
 85     * - ARM_MATH_BIG_ENDIAN:
 86     *
 87     * Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
 88     *
 89     * - ARM_MATH_MATRIX_CHECK:
 90     *
 91     * Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
 92     *
 93     * - ARM_MATH_ROUNDING:
 94     *
 95     * Define macro ARM_MATH_ROUNDING for rounding on support functions
 96     *
 97     * - ARM_MATH_LOOPUNROLL:
 98     *
 99     * Define macro ARM_MATH_LOOPUNROLL to enable manual loop unrolling in DSP functions
100     *
101     * - ARM_MATH_NEON:
102     *
103     * Define macro ARM_MATH_NEON to enable Neon versions of the DSP functions.
104     * It is not enabled by default when Neon is available because performances are 
105     * dependent on the compiler and target architecture.
106     *
107     * - ARM_MATH_NEON_EXPERIMENTAL:
108     *
109     * Define macro ARM_MATH_NEON_EXPERIMENTAL to enable experimental Neon versions of 
110     * of some DSP functions. Experimental Neon versions currently do not have better
111     * performances than the scalar versions.
112     *
113     * - ARM_MATH_HELIUM:
114     *
115     * It implies the flags ARM_MATH_MVEF and ARM_MATH_MVEI and ARM_MATH_MVE_FLOAT16.
116     *
117     * - ARM_MATH_HELIUM_EXPERIMENTAL:
118     *
119     * Only taken into account when ARM_MATH_MVEF, ARM_MATH_MVEI or ARM_MATH_MVE_FLOAT16 are defined.
120     * Enable some vector versions which may have worse performance than scalar
121     * depending on the core / compiler configuration.
122     *
123     * - ARM_MATH_MVEF:
124     *
125     * Select Helium versions of the f32 algorithms.
126     * It implies ARM_MATH_FLOAT16 and ARM_MATH_MVEI.
127     *
128     * - ARM_MATH_MVEI:
129     *
130     * Select Helium versions of the int and fixed point algorithms.
131     *
132     * - ARM_MATH_MVE_FLOAT16:
133     *
134     * MVE Float16 implementations of some algorithms (Requires MVE extension).
135     *
136     * - DISABLEFLOAT16:
137     *
138     * Disable float16 algorithms when __fp16 is not supported for a
139     * specific compiler / core configuration.
140     * This is only valid for scalar. When vector architecture is
141     * supporting f16 then it can't be disabled.
142     *
143     * - ARM_MATH_AUTOVECTORIZE:
144     *
145     * With Helium or Neon, disable the use of vectorized code with C intrinsics
146     * and use pure C instead. The vectorization is then done by the compiler.
147     *
148     * <hr>
149     * \section pack CMSIS-DSP in ARM::CMSIS Pack
150     *
151     * The following files relevant to CMSIS-DSP are present in the <b>ARM::CMSIS</b> Pack directories:
152     * |File/Folder                      |Content                                                                 |
153     * |---------------------------------|------------------------------------------------------------------------|
154     * |\b CMSIS\\Documentation\\DSP     | This documentation                                                     |
155     * |\b CMSIS\\DSP\\Examples          | Example projects demonstrating the usage of the library functions      |
156     * |\b CMSIS\\DSP\\Include           | DSP_Lib include files for using and building the lib
157     * |\b CMSIS\\DSP\\PrivateInclude    | DSP_Lib private include files for building the lib                                               |
158     * |\b CMSIS\\DSP\\Lib               | DSP_Lib binaries                                                       |
159     * |\b CMSIS\\DSP\\Source            | DSP_Lib source files                                                   |
160     *
161     * <hr>
162     * \section rev Revision History of CMSIS-DSP
163     * Please refer to \ref ChangeLog_pg.
164     */
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  /**
177   * @defgroup groupExamples Examples
178   */
179  
180  
181  
182  
183  
184  #ifndef _ARM_MATH_H
185  #define _ARM_MATH_H
186  
187  
188  #include "arm_math_types.h"
189  #include "arm_math_memory.h"
190  
191  #include "dsp/none.h"
192  #include "dsp/utils.h"
193  
194  #include "dsp/basic_math_functions.h"  
195  #include "dsp/interpolation_functions.h"
196  #include "dsp/bayes_functions.h"
197  #include "dsp/matrix_functions.h"
198  #include "dsp/complex_math_functions.h"
199  #include "dsp/statistics_functions.h"
200  #include "dsp/controller_functions.h"
201  #include "dsp/support_functions.h"
202  #include "dsp/distance_functions.h"
203  #include "dsp/svm_functions.h"
204  #include "dsp/fast_math_functions.h"
205  #include "dsp/transform_functions.h"
206  #include "dsp/filtering_functions.h"
207  #include "dsp/quaternion_math_functions.h"
208  
209  
210  
211  #ifdef   __cplusplus
212  extern "C"
213  {
214  #endif
215  
216  
217  
218  
219  //#define TABLE_SPACING_Q31     0x400000
220  //#define TABLE_SPACING_Q15     0x80
221  
222  
223  
224  
225  
226  #ifdef   __cplusplus
227  }
228  #endif
229  
230  
231  #endif /* _ARM_MATH_H */
232  
233  /**
234   *
235   * End of file.
236   */