The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
<>
Date:
Wed Apr 12 16:07:08 2017 +0100
Revision:
140:97feb9bacc10
Child:
145:64910690c574
Release 140 of the mbed library

Ports for Upcoming Targets

3841: Add nRf52840 target https://github.com/ARMmbed/mbed-os/pull/3841
3992: Introducing UBLOX_C030 platform. https://github.com/ARMmbed/mbed-os/pull/3992

Fixes and Changes

3951: [NUCLEO_F303ZE] Correct ARDUINO pin https://github.com/ARMmbed/mbed-os/pull/3951
4021: Fixing a macro to detect when RTOS was in use for the NRF52840_DK https://github.com/ARMmbed/mbed-os/pull/4021
3979: KW24D: Add missing SPI defines and Arduino connector definitions https://github.com/ARMmbed/mbed-os/pull/3979
3990: UBLOX_C027: construct a ticker-based wait, rather than calling wait_ms(), in the https://github.com/ARMmbed/mbed-os/pull/3990
4003: Fixed OBOE in async serial tx for NRF52 target, fixes #4002 https://github.com/ARMmbed/mbed-os/pull/4003
4012: STM32: Correct I2C master error handling https://github.com/ARMmbed/mbed-os/pull/4012
4020: NUCLEO_L011K4 remove unsupported tool chain files https://github.com/ARMmbed/mbed-os/pull/4020
4065: K66F: Move bss section to m_data_2 Section https://github.com/ARMmbed/mbed-os/pull/4065
4014: Issue 3763: Reduce heap allocation in the GCC linker file https://github.com/ARMmbed/mbed-os/pull/4014
4030: [STM32L0] reduce IAR heap and stack size for small targets https://github.com/ARMmbed/mbed-os/pull/4030
4109: NUCLEO_L476RG : minor serial pin update https://github.com/ARMmbed/mbed-os/pull/4109
3982: Ticker - kl25z bugfix for handling events in the past https://github.com/ARMmbed/mbed-os/pull/3982

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 140:97feb9bacc10 1 /* ----------------------------------------------------------------------
<> 140:97feb9bacc10 2 * Copyright (C) 2010-2015 ARM Limited. All rights reserved.
<> 140:97feb9bacc10 3 *
<> 140:97feb9bacc10 4 * $Date: 19. March 2015
<> 140:97feb9bacc10 5 * $Revision: V.1.4.5
<> 140:97feb9bacc10 6 *
<> 140:97feb9bacc10 7 * Project: CMSIS DSP Library
<> 140:97feb9bacc10 8 * Title: arm_math.h
<> 140:97feb9bacc10 9 *
<> 140:97feb9bacc10 10 * Description: Public header file for CMSIS DSP Library
<> 140:97feb9bacc10 11 *
<> 140:97feb9bacc10 12 * Target Processor: Cortex-M7/Cortex-M4/Cortex-M3/Cortex-M0
<> 140:97feb9bacc10 13 *
<> 140:97feb9bacc10 14 * Redistribution and use in source and binary forms, with or without
<> 140:97feb9bacc10 15 * modification, are permitted provided that the following conditions
<> 140:97feb9bacc10 16 * are met:
<> 140:97feb9bacc10 17 * - Redistributions of source code must retain the above copyright
<> 140:97feb9bacc10 18 * notice, this list of conditions and the following disclaimer.
<> 140:97feb9bacc10 19 * - Redistributions in binary form must reproduce the above copyright
<> 140:97feb9bacc10 20 * notice, this list of conditions and the following disclaimer in
<> 140:97feb9bacc10 21 * the documentation and/or other materials provided with the
<> 140:97feb9bacc10 22 * distribution.
<> 140:97feb9bacc10 23 * - Neither the name of ARM LIMITED nor the names of its contributors
<> 140:97feb9bacc10 24 * may be used to endorse or promote products derived from this
<> 140:97feb9bacc10 25 * software without specific prior written permission.
<> 140:97feb9bacc10 26 *
<> 140:97feb9bacc10 27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
<> 140:97feb9bacc10 28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
<> 140:97feb9bacc10 29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
<> 140:97feb9bacc10 30 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
<> 140:97feb9bacc10 31 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
<> 140:97feb9bacc10 32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
<> 140:97feb9bacc10 33 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
<> 140:97feb9bacc10 34 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 140:97feb9bacc10 35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
<> 140:97feb9bacc10 36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
<> 140:97feb9bacc10 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
<> 140:97feb9bacc10 38 * POSSIBILITY OF SUCH DAMAGE.
<> 140:97feb9bacc10 39 * -------------------------------------------------------------------- */
<> 140:97feb9bacc10 40
<> 140:97feb9bacc10 41 /**
<> 140:97feb9bacc10 42 \mainpage CMSIS DSP Software Library
<> 140:97feb9bacc10 43 *
<> 140:97feb9bacc10 44 * Introduction
<> 140:97feb9bacc10 45 * ------------
<> 140:97feb9bacc10 46 *
<> 140:97feb9bacc10 47 * This user manual describes the CMSIS DSP software library,
<> 140:97feb9bacc10 48 * a suite of common signal processing functions for use on Cortex-M processor based devices.
<> 140:97feb9bacc10 49 *
<> 140:97feb9bacc10 50 * The library is divided into a number of functions each covering a specific category:
<> 140:97feb9bacc10 51 * - Basic math functions
<> 140:97feb9bacc10 52 * - Fast math functions
<> 140:97feb9bacc10 53 * - Complex math functions
<> 140:97feb9bacc10 54 * - Filters
<> 140:97feb9bacc10 55 * - Matrix functions
<> 140:97feb9bacc10 56 * - Transforms
<> 140:97feb9bacc10 57 * - Motor control functions
<> 140:97feb9bacc10 58 * - Statistical functions
<> 140:97feb9bacc10 59 * - Support functions
<> 140:97feb9bacc10 60 * - Interpolation functions
<> 140:97feb9bacc10 61 *
<> 140:97feb9bacc10 62 * The library has separate functions for operating on 8-bit integers, 16-bit integers,
<> 140:97feb9bacc10 63 * 32-bit integer and 32-bit floating-point values.
<> 140:97feb9bacc10 64 *
<> 140:97feb9bacc10 65 * Using the Library
<> 140:97feb9bacc10 66 * ------------
<> 140:97feb9bacc10 67 *
<> 140:97feb9bacc10 68 * The library installer contains prebuilt versions of the libraries in the <code>Lib</code> folder.
<> 140:97feb9bacc10 69 * - arm_cortexM7lfdp_math.lib (Little endian and Double Precision Floating Point Unit on Cortex-M7)
<> 140:97feb9bacc10 70 * - arm_cortexM7bfdp_math.lib (Big endian and Double Precision Floating Point Unit on Cortex-M7)
<> 140:97feb9bacc10 71 * - arm_cortexM7lfsp_math.lib (Little endian and Single Precision Floating Point Unit on Cortex-M7)
<> 140:97feb9bacc10 72 * - arm_cortexM7bfsp_math.lib (Big endian and Single Precision Floating Point Unit on Cortex-M7)
<> 140:97feb9bacc10 73 * - arm_cortexM7l_math.lib (Little endian on Cortex-M7)
<> 140:97feb9bacc10 74 * - arm_cortexM7b_math.lib (Big endian on Cortex-M7)
<> 140:97feb9bacc10 75 * - arm_cortexM4lf_math.lib (Little endian and Floating Point Unit on Cortex-M4)
<> 140:97feb9bacc10 76 * - arm_cortexM4bf_math.lib (Big endian and Floating Point Unit on Cortex-M4)
<> 140:97feb9bacc10 77 * - arm_cortexM4l_math.lib (Little endian on Cortex-M4)
<> 140:97feb9bacc10 78 * - arm_cortexM4b_math.lib (Big endian on Cortex-M4)
<> 140:97feb9bacc10 79 * - arm_cortexM3l_math.lib (Little endian on Cortex-M3)
<> 140:97feb9bacc10 80 * - arm_cortexM3b_math.lib (Big endian on Cortex-M3)
<> 140:97feb9bacc10 81 * - arm_cortexM0l_math.lib (Little endian on Cortex-M0 / CortexM0+)
<> 140:97feb9bacc10 82 * - arm_cortexM0b_math.lib (Big endian on Cortex-M0 / CortexM0+)
<> 140:97feb9bacc10 83 *
<> 140:97feb9bacc10 84 * The library functions are declared in the public file <code>arm_math.h</code> which is placed in the <code>Include</code> folder.
<> 140:97feb9bacc10 85 * Simply include this file and link the appropriate library in the application and begin calling the library functions. The Library supports single
<> 140:97feb9bacc10 86 * public header file <code> arm_math.h</code> for Cortex-M7/M4/M3/M0/M0+ with little endian and big endian. Same header file will be used for floating point unit(FPU) variants.
<> 140:97feb9bacc10 87 * Define the appropriate pre processor MACRO ARM_MATH_CM7 or ARM_MATH_CM4 or ARM_MATH_CM3 or
<> 140:97feb9bacc10 88 * ARM_MATH_CM0 or ARM_MATH_CM0PLUS depending on the target processor in the application.
<> 140:97feb9bacc10 89 *
<> 140:97feb9bacc10 90 * Examples
<> 140:97feb9bacc10 91 * --------
<> 140:97feb9bacc10 92 *
<> 140:97feb9bacc10 93 * The library ships with a number of examples which demonstrate how to use the library functions.
<> 140:97feb9bacc10 94 *
<> 140:97feb9bacc10 95 * Toolchain Support
<> 140:97feb9bacc10 96 * ------------
<> 140:97feb9bacc10 97 *
<> 140:97feb9bacc10 98 * The library has been developed and tested with MDK-ARM version 5.14.0.0
<> 140:97feb9bacc10 99 * The library is being tested in GCC and IAR toolchains and updates on this activity will be made available shortly.
<> 140:97feb9bacc10 100 *
<> 140:97feb9bacc10 101 * Building the Library
<> 140:97feb9bacc10 102 * ------------
<> 140:97feb9bacc10 103 *
<> 140:97feb9bacc10 104 * The library installer contains a project file to re build libraries on MDK-ARM Tool chain in the <code>CMSIS\\DSP_Lib\\Source\\ARM</code> folder.
<> 140:97feb9bacc10 105 * - arm_cortexM_math.uvprojx
<> 140:97feb9bacc10 106 *
<> 140:97feb9bacc10 107 *
<> 140:97feb9bacc10 108 * The libraries can be built by opening the arm_cortexM_math.uvprojx project in MDK-ARM, selecting a specific target, and defining the optional pre processor MACROs detailed above.
<> 140:97feb9bacc10 109 *
<> 140:97feb9bacc10 110 * Pre-processor Macros
<> 140:97feb9bacc10 111 * ------------
<> 140:97feb9bacc10 112 *
<> 140:97feb9bacc10 113 * Each library project have differant pre-processor macros.
<> 140:97feb9bacc10 114 *
<> 140:97feb9bacc10 115 * - UNALIGNED_SUPPORT_DISABLE:
<> 140:97feb9bacc10 116 *
<> 140:97feb9bacc10 117 * Define macro UNALIGNED_SUPPORT_DISABLE, If the silicon does not support unaligned memory access
<> 140:97feb9bacc10 118 *
<> 140:97feb9bacc10 119 * - ARM_MATH_BIG_ENDIAN:
<> 140:97feb9bacc10 120 *
<> 140:97feb9bacc10 121 * Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
<> 140:97feb9bacc10 122 *
<> 140:97feb9bacc10 123 * - ARM_MATH_MATRIX_CHECK:
<> 140:97feb9bacc10 124 *
<> 140:97feb9bacc10 125 * Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
<> 140:97feb9bacc10 126 *
<> 140:97feb9bacc10 127 * - ARM_MATH_ROUNDING:
<> 140:97feb9bacc10 128 *
<> 140:97feb9bacc10 129 * Define macro ARM_MATH_ROUNDING for rounding on support functions
<> 140:97feb9bacc10 130 *
<> 140:97feb9bacc10 131 * - ARM_MATH_CMx:
<> 140:97feb9bacc10 132 *
<> 140:97feb9bacc10 133 * Define macro ARM_MATH_CM4 for building the library on Cortex-M4 target, ARM_MATH_CM3 for building library on Cortex-M3 target
<> 140:97feb9bacc10 134 * and ARM_MATH_CM0 for building library on Cortex-M0 target, ARM_MATH_CM0PLUS for building library on Cortex-M0+ target, and
<> 140:97feb9bacc10 135 * ARM_MATH_CM7 for building the library on cortex-M7.
<> 140:97feb9bacc10 136 *
<> 140:97feb9bacc10 137 * - __FPU_PRESENT:
<> 140:97feb9bacc10 138 *
<> 140:97feb9bacc10 139 * Initialize macro __FPU_PRESENT = 1 when building on FPU supported Targets. Enable this macro for M4bf and M4lf libraries
<> 140:97feb9bacc10 140 *
<> 140:97feb9bacc10 141 * <hr>
<> 140:97feb9bacc10 142 * CMSIS-DSP in ARM::CMSIS Pack
<> 140:97feb9bacc10 143 * -----------------------------
<> 140:97feb9bacc10 144 *
<> 140:97feb9bacc10 145 * The following files relevant to CMSIS-DSP are present in the <b>ARM::CMSIS</b> Pack directories:
<> 140:97feb9bacc10 146 * |File/Folder |Content |
<> 140:97feb9bacc10 147 * |------------------------------|------------------------------------------------------------------------|
<> 140:97feb9bacc10 148 * |\b CMSIS\\Documentation\\DSP | This documentation |
<> 140:97feb9bacc10 149 * |\b CMSIS\\DSP_Lib | Software license agreement (license.txt) |
<> 140:97feb9bacc10 150 * |\b CMSIS\\DSP_Lib\\Examples | Example projects demonstrating the usage of the library functions |
<> 140:97feb9bacc10 151 * |\b CMSIS\\DSP_Lib\\Source | Source files for rebuilding the library |
<> 140:97feb9bacc10 152 *
<> 140:97feb9bacc10 153 * <hr>
<> 140:97feb9bacc10 154 * Revision History of CMSIS-DSP
<> 140:97feb9bacc10 155 * ------------
<> 140:97feb9bacc10 156 * Please refer to \ref ChangeLog_pg.
<> 140:97feb9bacc10 157 *
<> 140:97feb9bacc10 158 * Copyright Notice
<> 140:97feb9bacc10 159 * ------------
<> 140:97feb9bacc10 160 *
<> 140:97feb9bacc10 161 * Copyright (C) 2010-2015 ARM Limited. All rights reserved.
<> 140:97feb9bacc10 162 */
<> 140:97feb9bacc10 163
<> 140:97feb9bacc10 164
<> 140:97feb9bacc10 165 /**
<> 140:97feb9bacc10 166 * @defgroup groupMath Basic Math Functions
<> 140:97feb9bacc10 167 */
<> 140:97feb9bacc10 168
<> 140:97feb9bacc10 169 /**
<> 140:97feb9bacc10 170 * @defgroup groupFastMath Fast Math Functions
<> 140:97feb9bacc10 171 * This set of functions provides a fast approximation to sine, cosine, and square root.
<> 140:97feb9bacc10 172 * As compared to most of the other functions in the CMSIS math library, the fast math functions
<> 140:97feb9bacc10 173 * operate on individual values and not arrays.
<> 140:97feb9bacc10 174 * There are separate functions for Q15, Q31, and floating-point data.
<> 140:97feb9bacc10 175 *
<> 140:97feb9bacc10 176 */
<> 140:97feb9bacc10 177
<> 140:97feb9bacc10 178 /**
<> 140:97feb9bacc10 179 * @defgroup groupCmplxMath Complex Math Functions
<> 140:97feb9bacc10 180 * This set of functions operates on complex data vectors.
<> 140:97feb9bacc10 181 * The data in the complex arrays is stored in an interleaved fashion
<> 140:97feb9bacc10 182 * (real, imag, real, imag, ...).
<> 140:97feb9bacc10 183 * In the API functions, the number of samples in a complex array refers
<> 140:97feb9bacc10 184 * to the number of complex values; the array contains twice this number of
<> 140:97feb9bacc10 185 * real values.
<> 140:97feb9bacc10 186 */
<> 140:97feb9bacc10 187
<> 140:97feb9bacc10 188 /**
<> 140:97feb9bacc10 189 * @defgroup groupFilters Filtering Functions
<> 140:97feb9bacc10 190 */
<> 140:97feb9bacc10 191
<> 140:97feb9bacc10 192 /**
<> 140:97feb9bacc10 193 * @defgroup groupMatrix Matrix Functions
<> 140:97feb9bacc10 194 *
<> 140:97feb9bacc10 195 * This set of functions provides basic matrix math operations.
<> 140:97feb9bacc10 196 * The functions operate on matrix data structures. For example,
<> 140:97feb9bacc10 197 * the type
<> 140:97feb9bacc10 198 * definition for the floating-point matrix structure is shown
<> 140:97feb9bacc10 199 * below:
<> 140:97feb9bacc10 200 * <pre>
<> 140:97feb9bacc10 201 * typedef struct
<> 140:97feb9bacc10 202 * {
<> 140:97feb9bacc10 203 * uint16_t numRows; // number of rows of the matrix.
<> 140:97feb9bacc10 204 * uint16_t numCols; // number of columns of the matrix.
<> 140:97feb9bacc10 205 * float32_t *pData; // points to the data of the matrix.
<> 140:97feb9bacc10 206 * } arm_matrix_instance_f32;
<> 140:97feb9bacc10 207 * </pre>
<> 140:97feb9bacc10 208 * There are similar definitions for Q15 and Q31 data types.
<> 140:97feb9bacc10 209 *
<> 140:97feb9bacc10 210 * The structure specifies the size of the matrix and then points to
<> 140:97feb9bacc10 211 * an array of data. The array is of size <code>numRows X numCols</code>
<> 140:97feb9bacc10 212 * and the values are arranged in row order. That is, the
<> 140:97feb9bacc10 213 * matrix element (i, j) is stored at:
<> 140:97feb9bacc10 214 * <pre>
<> 140:97feb9bacc10 215 * pData[i*numCols + j]
<> 140:97feb9bacc10 216 * </pre>
<> 140:97feb9bacc10 217 *
<> 140:97feb9bacc10 218 * \par Init Functions
<> 140:97feb9bacc10 219 * There is an associated initialization function for each type of matrix
<> 140:97feb9bacc10 220 * data structure.
<> 140:97feb9bacc10 221 * The initialization function sets the values of the internal structure fields.
<> 140:97feb9bacc10 222 * Refer to the function <code>arm_mat_init_f32()</code>, <code>arm_mat_init_q31()</code>
<> 140:97feb9bacc10 223 * and <code>arm_mat_init_q15()</code> for floating-point, Q31 and Q15 types, respectively.
<> 140:97feb9bacc10 224 *
<> 140:97feb9bacc10 225 * \par
<> 140:97feb9bacc10 226 * Use of the initialization function is optional. However, if initialization function is used
<> 140:97feb9bacc10 227 * then the instance structure cannot be placed into a const data section.
<> 140:97feb9bacc10 228 * To place the instance structure in a const data
<> 140:97feb9bacc10 229 * section, manually initialize the data structure. For example:
<> 140:97feb9bacc10 230 * <pre>
<> 140:97feb9bacc10 231 * <code>arm_matrix_instance_f32 S = {nRows, nColumns, pData};</code>
<> 140:97feb9bacc10 232 * <code>arm_matrix_instance_q31 S = {nRows, nColumns, pData};</code>
<> 140:97feb9bacc10 233 * <code>arm_matrix_instance_q15 S = {nRows, nColumns, pData};</code>
<> 140:97feb9bacc10 234 * </pre>
<> 140:97feb9bacc10 235 * where <code>nRows</code> specifies the number of rows, <code>nColumns</code>
<> 140:97feb9bacc10 236 * specifies the number of columns, and <code>pData</code> points to the
<> 140:97feb9bacc10 237 * data array.
<> 140:97feb9bacc10 238 *
<> 140:97feb9bacc10 239 * \par Size Checking
<> 140:97feb9bacc10 240 * By default all of the matrix functions perform size checking on the input and
<> 140:97feb9bacc10 241 * output matrices. For example, the matrix addition function verifies that the
<> 140:97feb9bacc10 242 * two input matrices and the output matrix all have the same number of rows and
<> 140:97feb9bacc10 243 * columns. If the size check fails the functions return:
<> 140:97feb9bacc10 244 * <pre>
<> 140:97feb9bacc10 245 * ARM_MATH_SIZE_MISMATCH
<> 140:97feb9bacc10 246 * </pre>
<> 140:97feb9bacc10 247 * Otherwise the functions return
<> 140:97feb9bacc10 248 * <pre>
<> 140:97feb9bacc10 249 * ARM_MATH_SUCCESS
<> 140:97feb9bacc10 250 * </pre>
<> 140:97feb9bacc10 251 * There is some overhead associated with this matrix size checking.
<> 140:97feb9bacc10 252 * The matrix size checking is enabled via the \#define
<> 140:97feb9bacc10 253 * <pre>
<> 140:97feb9bacc10 254 * ARM_MATH_MATRIX_CHECK
<> 140:97feb9bacc10 255 * </pre>
<> 140:97feb9bacc10 256 * within the library project settings. By default this macro is defined
<> 140:97feb9bacc10 257 * and size checking is enabled. By changing the project settings and
<> 140:97feb9bacc10 258 * undefining this macro size checking is eliminated and the functions
<> 140:97feb9bacc10 259 * run a bit faster. With size checking disabled the functions always
<> 140:97feb9bacc10 260 * return <code>ARM_MATH_SUCCESS</code>.
<> 140:97feb9bacc10 261 */
<> 140:97feb9bacc10 262
<> 140:97feb9bacc10 263 /**
<> 140:97feb9bacc10 264 * @defgroup groupTransforms Transform Functions
<> 140:97feb9bacc10 265 */
<> 140:97feb9bacc10 266
<> 140:97feb9bacc10 267 /**
<> 140:97feb9bacc10 268 * @defgroup groupController Controller Functions
<> 140:97feb9bacc10 269 */
<> 140:97feb9bacc10 270
<> 140:97feb9bacc10 271 /**
<> 140:97feb9bacc10 272 * @defgroup groupStats Statistics Functions
<> 140:97feb9bacc10 273 */
<> 140:97feb9bacc10 274 /**
<> 140:97feb9bacc10 275 * @defgroup groupSupport Support Functions
<> 140:97feb9bacc10 276 */
<> 140:97feb9bacc10 277
<> 140:97feb9bacc10 278 /**
<> 140:97feb9bacc10 279 * @defgroup groupInterpolation Interpolation Functions
<> 140:97feb9bacc10 280 * These functions perform 1- and 2-dimensional interpolation of data.
<> 140:97feb9bacc10 281 * Linear interpolation is used for 1-dimensional data and
<> 140:97feb9bacc10 282 * bilinear interpolation is used for 2-dimensional data.
<> 140:97feb9bacc10 283 */
<> 140:97feb9bacc10 284
<> 140:97feb9bacc10 285 /**
<> 140:97feb9bacc10 286 * @defgroup groupExamples Examples
<> 140:97feb9bacc10 287 */
<> 140:97feb9bacc10 288 #ifndef _ARM_MATH_H
<> 140:97feb9bacc10 289 #define _ARM_MATH_H
<> 140:97feb9bacc10 290
<> 140:97feb9bacc10 291 #define __CMSIS_GENERIC /* disable NVIC and Systick functions */
<> 140:97feb9bacc10 292
<> 140:97feb9bacc10 293 #if defined(ARM_MATH_CM7)
<> 140:97feb9bacc10 294 #include "core_cm7.h"
<> 140:97feb9bacc10 295 #elif defined (ARM_MATH_CM4)
<> 140:97feb9bacc10 296 #include "core_cm4.h"
<> 140:97feb9bacc10 297 #elif defined (ARM_MATH_CM3)
<> 140:97feb9bacc10 298 #include "core_cm3.h"
<> 140:97feb9bacc10 299 #elif defined (ARM_MATH_CM0)
<> 140:97feb9bacc10 300 #include "core_cm0.h"
<> 140:97feb9bacc10 301 #define ARM_MATH_CM0_FAMILY
<> 140:97feb9bacc10 302 #elif defined (ARM_MATH_CM0PLUS)
<> 140:97feb9bacc10 303 #include "core_cm0plus.h"
<> 140:97feb9bacc10 304 #define ARM_MATH_CM0_FAMILY
<> 140:97feb9bacc10 305 #else
<> 140:97feb9bacc10 306 #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"
<> 140:97feb9bacc10 307 #endif
<> 140:97feb9bacc10 308
<> 140:97feb9bacc10 309 #undef __CMSIS_GENERIC /* enable NVIC and Systick functions */
<> 140:97feb9bacc10 310 #include "string.h"
<> 140:97feb9bacc10 311 #include "math.h"
<> 140:97feb9bacc10 312 #ifdef __cplusplus
<> 140:97feb9bacc10 313 extern "C"
<> 140:97feb9bacc10 314 {
<> 140:97feb9bacc10 315 #endif
<> 140:97feb9bacc10 316
<> 140:97feb9bacc10 317
<> 140:97feb9bacc10 318 /**
<> 140:97feb9bacc10 319 * @brief Macros required for reciprocal calculation in Normalized LMS
<> 140:97feb9bacc10 320 */
<> 140:97feb9bacc10 321
<> 140:97feb9bacc10 322 #define DELTA_Q31 (0x100)
<> 140:97feb9bacc10 323 #define DELTA_Q15 0x5
<> 140:97feb9bacc10 324 #define INDEX_MASK 0x0000003F
<> 140:97feb9bacc10 325 #ifndef PI
<> 140:97feb9bacc10 326 #define PI 3.14159265358979f
<> 140:97feb9bacc10 327 #endif
<> 140:97feb9bacc10 328
<> 140:97feb9bacc10 329 /**
<> 140:97feb9bacc10 330 * @brief Macros required for SINE and COSINE Fast math approximations
<> 140:97feb9bacc10 331 */
<> 140:97feb9bacc10 332
<> 140:97feb9bacc10 333 #define FAST_MATH_TABLE_SIZE 512
<> 140:97feb9bacc10 334 #define FAST_MATH_Q31_SHIFT (32 - 10)
<> 140:97feb9bacc10 335 #define FAST_MATH_Q15_SHIFT (16 - 10)
<> 140:97feb9bacc10 336 #define CONTROLLER_Q31_SHIFT (32 - 9)
<> 140:97feb9bacc10 337 #define TABLE_SIZE 256
<> 140:97feb9bacc10 338 #define TABLE_SPACING_Q31 0x400000
<> 140:97feb9bacc10 339 #define TABLE_SPACING_Q15 0x80
<> 140:97feb9bacc10 340
<> 140:97feb9bacc10 341 /**
<> 140:97feb9bacc10 342 * @brief Macros required for SINE and COSINE Controller functions
<> 140:97feb9bacc10 343 */
<> 140:97feb9bacc10 344 /* 1.31(q31) Fixed value of 2/360 */
<> 140:97feb9bacc10 345 /* -1 to +1 is divided into 360 values so total spacing is (2/360) */
<> 140:97feb9bacc10 346 #define INPUT_SPACING 0xB60B61
<> 140:97feb9bacc10 347
<> 140:97feb9bacc10 348 /**
<> 140:97feb9bacc10 349 * @brief Macro for Unaligned Support
<> 140:97feb9bacc10 350 */
<> 140:97feb9bacc10 351 #ifndef UNALIGNED_SUPPORT_DISABLE
<> 140:97feb9bacc10 352 #define ALIGN4
<> 140:97feb9bacc10 353 #else
<> 140:97feb9bacc10 354 #if defined (__GNUC__)
<> 140:97feb9bacc10 355 #define ALIGN4 __attribute__((aligned(4)))
<> 140:97feb9bacc10 356 #else
<> 140:97feb9bacc10 357 #define ALIGN4 __align(4)
<> 140:97feb9bacc10 358 #endif
<> 140:97feb9bacc10 359 #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */
<> 140:97feb9bacc10 360
<> 140:97feb9bacc10 361 /**
<> 140:97feb9bacc10 362 * @brief Error status returned by some functions in the library.
<> 140:97feb9bacc10 363 */
<> 140:97feb9bacc10 364
<> 140:97feb9bacc10 365 typedef enum
<> 140:97feb9bacc10 366 {
<> 140:97feb9bacc10 367 ARM_MATH_SUCCESS = 0, /**< No error */
<> 140:97feb9bacc10 368 ARM_MATH_ARGUMENT_ERROR = -1, /**< One or more arguments are incorrect */
<> 140:97feb9bacc10 369 ARM_MATH_LENGTH_ERROR = -2, /**< Length of data buffer is incorrect */
<> 140:97feb9bacc10 370 ARM_MATH_SIZE_MISMATCH = -3, /**< Size of matrices is not compatible with the operation. */
<> 140:97feb9bacc10 371 ARM_MATH_NANINF = -4, /**< Not-a-number (NaN) or infinity is generated */
<> 140:97feb9bacc10 372 ARM_MATH_SINGULAR = -5, /**< Generated by matrix inversion if the input matrix is singular and cannot be inverted. */
<> 140:97feb9bacc10 373 ARM_MATH_TEST_FAILURE = -6 /**< Test Failed */
<> 140:97feb9bacc10 374 } arm_status;
<> 140:97feb9bacc10 375
<> 140:97feb9bacc10 376 /**
<> 140:97feb9bacc10 377 * @brief 8-bit fractional data type in 1.7 format.
<> 140:97feb9bacc10 378 */
<> 140:97feb9bacc10 379 typedef int8_t q7_t;
<> 140:97feb9bacc10 380
<> 140:97feb9bacc10 381 /**
<> 140:97feb9bacc10 382 * @brief 16-bit fractional data type in 1.15 format.
<> 140:97feb9bacc10 383 */
<> 140:97feb9bacc10 384 typedef int16_t q15_t;
<> 140:97feb9bacc10 385
<> 140:97feb9bacc10 386 /**
<> 140:97feb9bacc10 387 * @brief 32-bit fractional data type in 1.31 format.
<> 140:97feb9bacc10 388 */
<> 140:97feb9bacc10 389 typedef int32_t q31_t;
<> 140:97feb9bacc10 390
<> 140:97feb9bacc10 391 /**
<> 140:97feb9bacc10 392 * @brief 64-bit fractional data type in 1.63 format.
<> 140:97feb9bacc10 393 */
<> 140:97feb9bacc10 394 typedef int64_t q63_t;
<> 140:97feb9bacc10 395
<> 140:97feb9bacc10 396 /**
<> 140:97feb9bacc10 397 * @brief 32-bit floating-point type definition.
<> 140:97feb9bacc10 398 */
<> 140:97feb9bacc10 399 typedef float float32_t;
<> 140:97feb9bacc10 400
<> 140:97feb9bacc10 401 /**
<> 140:97feb9bacc10 402 * @brief 64-bit floating-point type definition.
<> 140:97feb9bacc10 403 */
<> 140:97feb9bacc10 404 typedef double float64_t;
<> 140:97feb9bacc10 405
<> 140:97feb9bacc10 406 /**
<> 140:97feb9bacc10 407 * @brief definition to read/write two 16 bit values.
<> 140:97feb9bacc10 408 */
<> 140:97feb9bacc10 409 #if defined __CC_ARM
<> 140:97feb9bacc10 410 #define __SIMD32_TYPE int32_t __packed
<> 140:97feb9bacc10 411 #define CMSIS_UNUSED __attribute__((unused))
<> 140:97feb9bacc10 412 #elif defined __ICCARM__
<> 140:97feb9bacc10 413 #define __SIMD32_TYPE int32_t __packed
<> 140:97feb9bacc10 414 #define CMSIS_UNUSED
<> 140:97feb9bacc10 415 #elif defined __GNUC__
<> 140:97feb9bacc10 416 #define __SIMD32_TYPE int32_t
<> 140:97feb9bacc10 417 #define CMSIS_UNUSED __attribute__((unused))
<> 140:97feb9bacc10 418 #elif defined __CSMC__ /* Cosmic */
<> 140:97feb9bacc10 419 #define __SIMD32_TYPE int32_t
<> 140:97feb9bacc10 420 #define CMSIS_UNUSED
<> 140:97feb9bacc10 421 #elif defined __TASKING__
<> 140:97feb9bacc10 422 #define __SIMD32_TYPE __unaligned int32_t
<> 140:97feb9bacc10 423 #define CMSIS_UNUSED
<> 140:97feb9bacc10 424 #else
<> 140:97feb9bacc10 425 #error Unknown compiler
<> 140:97feb9bacc10 426 #endif
<> 140:97feb9bacc10 427
<> 140:97feb9bacc10 428 #define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr))
<> 140:97feb9bacc10 429 #define __SIMD32_CONST(addr) ((__SIMD32_TYPE *)(addr))
<> 140:97feb9bacc10 430
<> 140:97feb9bacc10 431 #define _SIMD32_OFFSET(addr) (*(__SIMD32_TYPE *) (addr))
<> 140:97feb9bacc10 432
<> 140:97feb9bacc10 433 #define __SIMD64(addr) (*(int64_t **) & (addr))
<> 140:97feb9bacc10 434
<> 140:97feb9bacc10 435 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
<> 140:97feb9bacc10 436 /**
<> 140:97feb9bacc10 437 * @brief definition to pack two 16 bit values.
<> 140:97feb9bacc10 438 */
<> 140:97feb9bacc10 439 #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \
<> 140:97feb9bacc10 440 (((int32_t)(ARG2) << ARG3) & (int32_t)0xFFFF0000) )
<> 140:97feb9bacc10 441 #define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \
<> 140:97feb9bacc10 442 (((int32_t)(ARG2) >> ARG3) & (int32_t)0x0000FFFF) )
<> 140:97feb9bacc10 443
<> 140:97feb9bacc10 444 #endif
<> 140:97feb9bacc10 445
<> 140:97feb9bacc10 446
<> 140:97feb9bacc10 447 /**
<> 140:97feb9bacc10 448 * @brief definition to pack four 8 bit values.
<> 140:97feb9bacc10 449 */
<> 140:97feb9bacc10 450 #ifndef ARM_MATH_BIG_ENDIAN
<> 140:97feb9bacc10 451
<> 140:97feb9bacc10 452 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \
<> 140:97feb9bacc10 453 (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \
<> 140:97feb9bacc10 454 (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \
<> 140:97feb9bacc10 455 (((int32_t)(v3) << 24) & (int32_t)0xFF000000) )
<> 140:97feb9bacc10 456 #else
<> 140:97feb9bacc10 457
<> 140:97feb9bacc10 458 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \
<> 140:97feb9bacc10 459 (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \
<> 140:97feb9bacc10 460 (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \
<> 140:97feb9bacc10 461 (((int32_t)(v0) << 24) & (int32_t)0xFF000000) )
<> 140:97feb9bacc10 462
<> 140:97feb9bacc10 463 #endif
<> 140:97feb9bacc10 464
<> 140:97feb9bacc10 465
<> 140:97feb9bacc10 466 /**
<> 140:97feb9bacc10 467 * @brief Clips Q63 to Q31 values.
<> 140:97feb9bacc10 468 */
<> 140:97feb9bacc10 469 static __INLINE q31_t clip_q63_to_q31(
<> 140:97feb9bacc10 470 q63_t x)
<> 140:97feb9bacc10 471 {
<> 140:97feb9bacc10 472 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
<> 140:97feb9bacc10 473 ((0x7FFFFFFF ^ ((q31_t) (x >> 63)))) : (q31_t) x;
<> 140:97feb9bacc10 474 }
<> 140:97feb9bacc10 475
<> 140:97feb9bacc10 476 /**
<> 140:97feb9bacc10 477 * @brief Clips Q63 to Q15 values.
<> 140:97feb9bacc10 478 */
<> 140:97feb9bacc10 479 static __INLINE q15_t clip_q63_to_q15(
<> 140:97feb9bacc10 480 q63_t x)
<> 140:97feb9bacc10 481 {
<> 140:97feb9bacc10 482 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
<> 140:97feb9bacc10 483 ((0x7FFF ^ ((q15_t) (x >> 63)))) : (q15_t) (x >> 15);
<> 140:97feb9bacc10 484 }
<> 140:97feb9bacc10 485
<> 140:97feb9bacc10 486 /**
<> 140:97feb9bacc10 487 * @brief Clips Q31 to Q7 values.
<> 140:97feb9bacc10 488 */
<> 140:97feb9bacc10 489 static __INLINE q7_t clip_q31_to_q7(
<> 140:97feb9bacc10 490 q31_t x)
<> 140:97feb9bacc10 491 {
<> 140:97feb9bacc10 492 return ((q31_t) (x >> 24) != ((q31_t) x >> 23)) ?
<> 140:97feb9bacc10 493 ((0x7F ^ ((q7_t) (x >> 31)))) : (q7_t) x;
<> 140:97feb9bacc10 494 }
<> 140:97feb9bacc10 495
<> 140:97feb9bacc10 496 /**
<> 140:97feb9bacc10 497 * @brief Clips Q31 to Q15 values.
<> 140:97feb9bacc10 498 */
<> 140:97feb9bacc10 499 static __INLINE q15_t clip_q31_to_q15(
<> 140:97feb9bacc10 500 q31_t x)
<> 140:97feb9bacc10 501 {
<> 140:97feb9bacc10 502 return ((q31_t) (x >> 16) != ((q31_t) x >> 15)) ?
<> 140:97feb9bacc10 503 ((0x7FFF ^ ((q15_t) (x >> 31)))) : (q15_t) x;
<> 140:97feb9bacc10 504 }
<> 140:97feb9bacc10 505
<> 140:97feb9bacc10 506 /**
<> 140:97feb9bacc10 507 * @brief Multiplies 32 X 64 and returns 32 bit result in 2.30 format.
<> 140:97feb9bacc10 508 */
<> 140:97feb9bacc10 509
<> 140:97feb9bacc10 510 static __INLINE q63_t mult32x64(
<> 140:97feb9bacc10 511 q63_t x,
<> 140:97feb9bacc10 512 q31_t y)
<> 140:97feb9bacc10 513 {
<> 140:97feb9bacc10 514 return ((((q63_t) (x & 0x00000000FFFFFFFF) * y) >> 32) +
<> 140:97feb9bacc10 515 (((q63_t) (x >> 32) * y)));
<> 140:97feb9bacc10 516 }
<> 140:97feb9bacc10 517
<> 140:97feb9bacc10 518
<> 140:97feb9bacc10 519 //#if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM )
<> 140:97feb9bacc10 520 //#define __CLZ __clz
<> 140:97feb9bacc10 521 //#endif
<> 140:97feb9bacc10 522
<> 140:97feb9bacc10 523 //note: function can be removed when all toolchain support __CLZ for Cortex-M0
<> 140:97feb9bacc10 524 #if defined (ARM_MATH_CM0_FAMILY) && ((defined (__ICCARM__)) )
<> 140:97feb9bacc10 525
<> 140:97feb9bacc10 526 static __INLINE uint32_t __CLZ(
<> 140:97feb9bacc10 527 q31_t data);
<> 140:97feb9bacc10 528
<> 140:97feb9bacc10 529
<> 140:97feb9bacc10 530 static __INLINE uint32_t __CLZ(
<> 140:97feb9bacc10 531 q31_t data)
<> 140:97feb9bacc10 532 {
<> 140:97feb9bacc10 533 uint32_t count = 0;
<> 140:97feb9bacc10 534 uint32_t mask = 0x80000000;
<> 140:97feb9bacc10 535
<> 140:97feb9bacc10 536 while((data & mask) == 0)
<> 140:97feb9bacc10 537 {
<> 140:97feb9bacc10 538 count += 1u;
<> 140:97feb9bacc10 539 mask = mask >> 1u;
<> 140:97feb9bacc10 540 }
<> 140:97feb9bacc10 541
<> 140:97feb9bacc10 542 return (count);
<> 140:97feb9bacc10 543
<> 140:97feb9bacc10 544 }
<> 140:97feb9bacc10 545
<> 140:97feb9bacc10 546 #endif
<> 140:97feb9bacc10 547
<> 140:97feb9bacc10 548 /**
<> 140:97feb9bacc10 549 * @brief Function to Calculates 1/in (reciprocal) value of Q31 Data type.
<> 140:97feb9bacc10 550 */
<> 140:97feb9bacc10 551
<> 140:97feb9bacc10 552 static __INLINE uint32_t arm_recip_q31(
<> 140:97feb9bacc10 553 q31_t in,
<> 140:97feb9bacc10 554 q31_t * dst,
<> 140:97feb9bacc10 555 q31_t * pRecipTable)
<> 140:97feb9bacc10 556 {
<> 140:97feb9bacc10 557
<> 140:97feb9bacc10 558 uint32_t out, tempVal;
<> 140:97feb9bacc10 559 uint32_t index, i;
<> 140:97feb9bacc10 560 uint32_t signBits;
<> 140:97feb9bacc10 561
<> 140:97feb9bacc10 562 if(in > 0)
<> 140:97feb9bacc10 563 {
<> 140:97feb9bacc10 564 signBits = __CLZ(in) - 1;
<> 140:97feb9bacc10 565 }
<> 140:97feb9bacc10 566 else
<> 140:97feb9bacc10 567 {
<> 140:97feb9bacc10 568 signBits = __CLZ(-in) - 1;
<> 140:97feb9bacc10 569 }
<> 140:97feb9bacc10 570
<> 140:97feb9bacc10 571 /* Convert input sample to 1.31 format */
<> 140:97feb9bacc10 572 in = in << signBits;
<> 140:97feb9bacc10 573
<> 140:97feb9bacc10 574 /* calculation of index for initial approximated Val */
<> 140:97feb9bacc10 575 index = (uint32_t) (in >> 24u);
<> 140:97feb9bacc10 576 index = (index & INDEX_MASK);
<> 140:97feb9bacc10 577
<> 140:97feb9bacc10 578 /* 1.31 with exp 1 */
<> 140:97feb9bacc10 579 out = pRecipTable[index];
<> 140:97feb9bacc10 580
<> 140:97feb9bacc10 581 /* calculation of reciprocal value */
<> 140:97feb9bacc10 582 /* running approximation for two iterations */
<> 140:97feb9bacc10 583 for (i = 0u; i < 2u; i++)
<> 140:97feb9bacc10 584 {
<> 140:97feb9bacc10 585 tempVal = (q31_t) (((q63_t) in * out) >> 31u);
<> 140:97feb9bacc10 586 tempVal = 0x7FFFFFFF - tempVal;
<> 140:97feb9bacc10 587 /* 1.31 with exp 1 */
<> 140:97feb9bacc10 588 //out = (q31_t) (((q63_t) out * tempVal) >> 30u);
<> 140:97feb9bacc10 589 out = (q31_t) clip_q63_to_q31(((q63_t) out * tempVal) >> 30u);
<> 140:97feb9bacc10 590 }
<> 140:97feb9bacc10 591
<> 140:97feb9bacc10 592 /* write output */
<> 140:97feb9bacc10 593 *dst = out;
<> 140:97feb9bacc10 594
<> 140:97feb9bacc10 595 /* return num of signbits of out = 1/in value */
<> 140:97feb9bacc10 596 return (signBits + 1u);
<> 140:97feb9bacc10 597
<> 140:97feb9bacc10 598 }
<> 140:97feb9bacc10 599
<> 140:97feb9bacc10 600 /**
<> 140:97feb9bacc10 601 * @brief Function to Calculates 1/in (reciprocal) value of Q15 Data type.
<> 140:97feb9bacc10 602 */
<> 140:97feb9bacc10 603 static __INLINE uint32_t arm_recip_q15(
<> 140:97feb9bacc10 604 q15_t in,
<> 140:97feb9bacc10 605 q15_t * dst,
<> 140:97feb9bacc10 606 q15_t * pRecipTable)
<> 140:97feb9bacc10 607 {
<> 140:97feb9bacc10 608
<> 140:97feb9bacc10 609 uint32_t out = 0, tempVal = 0;
<> 140:97feb9bacc10 610 uint32_t index = 0, i = 0;
<> 140:97feb9bacc10 611 uint32_t signBits = 0;
<> 140:97feb9bacc10 612
<> 140:97feb9bacc10 613 if(in > 0)
<> 140:97feb9bacc10 614 {
<> 140:97feb9bacc10 615 signBits = __CLZ(in) - 17;
<> 140:97feb9bacc10 616 }
<> 140:97feb9bacc10 617 else
<> 140:97feb9bacc10 618 {
<> 140:97feb9bacc10 619 signBits = __CLZ(-in) - 17;
<> 140:97feb9bacc10 620 }
<> 140:97feb9bacc10 621
<> 140:97feb9bacc10 622 /* Convert input sample to 1.15 format */
<> 140:97feb9bacc10 623 in = in << signBits;
<> 140:97feb9bacc10 624
<> 140:97feb9bacc10 625 /* calculation of index for initial approximated Val */
<> 140:97feb9bacc10 626 index = in >> 8;
<> 140:97feb9bacc10 627 index = (index & INDEX_MASK);
<> 140:97feb9bacc10 628
<> 140:97feb9bacc10 629 /* 1.15 with exp 1 */
<> 140:97feb9bacc10 630 out = pRecipTable[index];
<> 140:97feb9bacc10 631
<> 140:97feb9bacc10 632 /* calculation of reciprocal value */
<> 140:97feb9bacc10 633 /* running approximation for two iterations */
<> 140:97feb9bacc10 634 for (i = 0; i < 2; i++)
<> 140:97feb9bacc10 635 {
<> 140:97feb9bacc10 636 tempVal = (q15_t) (((q31_t) in * out) >> 15);
<> 140:97feb9bacc10 637 tempVal = 0x7FFF - tempVal;
<> 140:97feb9bacc10 638 /* 1.15 with exp 1 */
<> 140:97feb9bacc10 639 out = (q15_t) (((q31_t) out * tempVal) >> 14);
<> 140:97feb9bacc10 640 }
<> 140:97feb9bacc10 641
<> 140:97feb9bacc10 642 /* write output */
<> 140:97feb9bacc10 643 *dst = out;
<> 140:97feb9bacc10 644
<> 140:97feb9bacc10 645 /* return num of signbits of out = 1/in value */
<> 140:97feb9bacc10 646 return (signBits + 1);
<> 140:97feb9bacc10 647
<> 140:97feb9bacc10 648 }
<> 140:97feb9bacc10 649
<> 140:97feb9bacc10 650
<> 140:97feb9bacc10 651 /*
<> 140:97feb9bacc10 652 * @brief C custom defined intrinisic function for only M0 processors
<> 140:97feb9bacc10 653 */
<> 140:97feb9bacc10 654 #if defined(ARM_MATH_CM0_FAMILY)
<> 140:97feb9bacc10 655
<> 140:97feb9bacc10 656 static __INLINE q31_t __SSAT(
<> 140:97feb9bacc10 657 q31_t x,
<> 140:97feb9bacc10 658 uint32_t y)
<> 140:97feb9bacc10 659 {
<> 140:97feb9bacc10 660 int32_t posMax, negMin;
<> 140:97feb9bacc10 661 uint32_t i;
<> 140:97feb9bacc10 662
<> 140:97feb9bacc10 663 posMax = 1;
<> 140:97feb9bacc10 664 for (i = 0; i < (y - 1); i++)
<> 140:97feb9bacc10 665 {
<> 140:97feb9bacc10 666 posMax = posMax * 2;
<> 140:97feb9bacc10 667 }
<> 140:97feb9bacc10 668
<> 140:97feb9bacc10 669 if(x > 0)
<> 140:97feb9bacc10 670 {
<> 140:97feb9bacc10 671 posMax = (posMax - 1);
<> 140:97feb9bacc10 672
<> 140:97feb9bacc10 673 if(x > posMax)
<> 140:97feb9bacc10 674 {
<> 140:97feb9bacc10 675 x = posMax;
<> 140:97feb9bacc10 676 }
<> 140:97feb9bacc10 677 }
<> 140:97feb9bacc10 678 else
<> 140:97feb9bacc10 679 {
<> 140:97feb9bacc10 680 negMin = -posMax;
<> 140:97feb9bacc10 681
<> 140:97feb9bacc10 682 if(x < negMin)
<> 140:97feb9bacc10 683 {
<> 140:97feb9bacc10 684 x = negMin;
<> 140:97feb9bacc10 685 }
<> 140:97feb9bacc10 686 }
<> 140:97feb9bacc10 687 return (x);
<> 140:97feb9bacc10 688
<> 140:97feb9bacc10 689
<> 140:97feb9bacc10 690 }
<> 140:97feb9bacc10 691
<> 140:97feb9bacc10 692 #endif /* end of ARM_MATH_CM0_FAMILY */
<> 140:97feb9bacc10 693
<> 140:97feb9bacc10 694
<> 140:97feb9bacc10 695
<> 140:97feb9bacc10 696 /*
<> 140:97feb9bacc10 697 * @brief C custom defined intrinsic function for M3 and M0 processors
<> 140:97feb9bacc10 698 */
<> 140:97feb9bacc10 699 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
<> 140:97feb9bacc10 700
<> 140:97feb9bacc10 701 /*
<> 140:97feb9bacc10 702 * @brief C custom defined QADD8 for M3 and M0 processors
<> 140:97feb9bacc10 703 */
<> 140:97feb9bacc10 704 static __INLINE q31_t __QADD8(
<> 140:97feb9bacc10 705 q31_t x,
<> 140:97feb9bacc10 706 q31_t y)
<> 140:97feb9bacc10 707 {
<> 140:97feb9bacc10 708
<> 140:97feb9bacc10 709 q31_t sum;
<> 140:97feb9bacc10 710 q7_t r, s, t, u;
<> 140:97feb9bacc10 711
<> 140:97feb9bacc10 712 r = (q7_t) x;
<> 140:97feb9bacc10 713 s = (q7_t) y;
<> 140:97feb9bacc10 714
<> 140:97feb9bacc10 715 r = __SSAT((q31_t) (r + s), 8);
<> 140:97feb9bacc10 716 s = __SSAT(((q31_t) (((x << 16) >> 24) + ((y << 16) >> 24))), 8);
<> 140:97feb9bacc10 717 t = __SSAT(((q31_t) (((x << 8) >> 24) + ((y << 8) >> 24))), 8);
<> 140:97feb9bacc10 718 u = __SSAT(((q31_t) ((x >> 24) + (y >> 24))), 8);
<> 140:97feb9bacc10 719
<> 140:97feb9bacc10 720 sum =
<> 140:97feb9bacc10 721 (((q31_t) u << 24) & 0xFF000000) | (((q31_t) t << 16) & 0x00FF0000) |
<> 140:97feb9bacc10 722 (((q31_t) s << 8) & 0x0000FF00) | (r & 0x000000FF);
<> 140:97feb9bacc10 723
<> 140:97feb9bacc10 724 return sum;
<> 140:97feb9bacc10 725
<> 140:97feb9bacc10 726 }
<> 140:97feb9bacc10 727
<> 140:97feb9bacc10 728 /*
<> 140:97feb9bacc10 729 * @brief C custom defined QSUB8 for M3 and M0 processors
<> 140:97feb9bacc10 730 */
<> 140:97feb9bacc10 731 static __INLINE q31_t __QSUB8(
<> 140:97feb9bacc10 732 q31_t x,
<> 140:97feb9bacc10 733 q31_t y)
<> 140:97feb9bacc10 734 {
<> 140:97feb9bacc10 735
<> 140:97feb9bacc10 736 q31_t sum;
<> 140:97feb9bacc10 737 q31_t r, s, t, u;
<> 140:97feb9bacc10 738
<> 140:97feb9bacc10 739 r = (q7_t) x;
<> 140:97feb9bacc10 740 s = (q7_t) y;
<> 140:97feb9bacc10 741
<> 140:97feb9bacc10 742 r = __SSAT((r - s), 8);
<> 140:97feb9bacc10 743 s = __SSAT(((q31_t) (((x << 16) >> 24) - ((y << 16) >> 24))), 8) << 8;
<> 140:97feb9bacc10 744 t = __SSAT(((q31_t) (((x << 8) >> 24) - ((y << 8) >> 24))), 8) << 16;
<> 140:97feb9bacc10 745 u = __SSAT(((q31_t) ((x >> 24) - (y >> 24))), 8) << 24;
<> 140:97feb9bacc10 746
<> 140:97feb9bacc10 747 sum =
<> 140:97feb9bacc10 748 (u & 0xFF000000) | (t & 0x00FF0000) | (s & 0x0000FF00) | (r &
<> 140:97feb9bacc10 749 0x000000FF);
<> 140:97feb9bacc10 750
<> 140:97feb9bacc10 751 return sum;
<> 140:97feb9bacc10 752 }
<> 140:97feb9bacc10 753
<> 140:97feb9bacc10 754 /*
<> 140:97feb9bacc10 755 * @brief C custom defined QADD16 for M3 and M0 processors
<> 140:97feb9bacc10 756 */
<> 140:97feb9bacc10 757
<> 140:97feb9bacc10 758 /*
<> 140:97feb9bacc10 759 * @brief C custom defined QADD16 for M3 and M0 processors
<> 140:97feb9bacc10 760 */
<> 140:97feb9bacc10 761 static __INLINE q31_t __QADD16(
<> 140:97feb9bacc10 762 q31_t x,
<> 140:97feb9bacc10 763 q31_t y)
<> 140:97feb9bacc10 764 {
<> 140:97feb9bacc10 765
<> 140:97feb9bacc10 766 q31_t sum;
<> 140:97feb9bacc10 767 q31_t r, s;
<> 140:97feb9bacc10 768
<> 140:97feb9bacc10 769 r = (q15_t) x;
<> 140:97feb9bacc10 770 s = (q15_t) y;
<> 140:97feb9bacc10 771
<> 140:97feb9bacc10 772 r = __SSAT(r + s, 16);
<> 140:97feb9bacc10 773 s = __SSAT(((q31_t) ((x >> 16) + (y >> 16))), 16) << 16;
<> 140:97feb9bacc10 774
<> 140:97feb9bacc10 775 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 140:97feb9bacc10 776
<> 140:97feb9bacc10 777 return sum;
<> 140:97feb9bacc10 778
<> 140:97feb9bacc10 779 }
<> 140:97feb9bacc10 780
<> 140:97feb9bacc10 781 /*
<> 140:97feb9bacc10 782 * @brief C custom defined SHADD16 for M3 and M0 processors
<> 140:97feb9bacc10 783 */
<> 140:97feb9bacc10 784 static __INLINE q31_t __SHADD16(
<> 140:97feb9bacc10 785 q31_t x,
<> 140:97feb9bacc10 786 q31_t y)
<> 140:97feb9bacc10 787 {
<> 140:97feb9bacc10 788
<> 140:97feb9bacc10 789 q31_t sum;
<> 140:97feb9bacc10 790 q31_t r, s;
<> 140:97feb9bacc10 791
<> 140:97feb9bacc10 792 r = (q15_t) x;
<> 140:97feb9bacc10 793 s = (q15_t) y;
<> 140:97feb9bacc10 794
<> 140:97feb9bacc10 795 r = ((r >> 1) + (s >> 1));
<> 140:97feb9bacc10 796 s = ((q31_t) ((x >> 17) + (y >> 17))) << 16;
<> 140:97feb9bacc10 797
<> 140:97feb9bacc10 798 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 140:97feb9bacc10 799
<> 140:97feb9bacc10 800 return sum;
<> 140:97feb9bacc10 801
<> 140:97feb9bacc10 802 }
<> 140:97feb9bacc10 803
<> 140:97feb9bacc10 804 /*
<> 140:97feb9bacc10 805 * @brief C custom defined QSUB16 for M3 and M0 processors
<> 140:97feb9bacc10 806 */
<> 140:97feb9bacc10 807 static __INLINE q31_t __QSUB16(
<> 140:97feb9bacc10 808 q31_t x,
<> 140:97feb9bacc10 809 q31_t y)
<> 140:97feb9bacc10 810 {
<> 140:97feb9bacc10 811
<> 140:97feb9bacc10 812 q31_t sum;
<> 140:97feb9bacc10 813 q31_t r, s;
<> 140:97feb9bacc10 814
<> 140:97feb9bacc10 815 r = (q15_t) x;
<> 140:97feb9bacc10 816 s = (q15_t) y;
<> 140:97feb9bacc10 817
<> 140:97feb9bacc10 818 r = __SSAT(r - s, 16);
<> 140:97feb9bacc10 819 s = __SSAT(((q31_t) ((x >> 16) - (y >> 16))), 16) << 16;
<> 140:97feb9bacc10 820
<> 140:97feb9bacc10 821 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 140:97feb9bacc10 822
<> 140:97feb9bacc10 823 return sum;
<> 140:97feb9bacc10 824 }
<> 140:97feb9bacc10 825
<> 140:97feb9bacc10 826 /*
<> 140:97feb9bacc10 827 * @brief C custom defined SHSUB16 for M3 and M0 processors
<> 140:97feb9bacc10 828 */
<> 140:97feb9bacc10 829 static __INLINE q31_t __SHSUB16(
<> 140:97feb9bacc10 830 q31_t x,
<> 140:97feb9bacc10 831 q31_t y)
<> 140:97feb9bacc10 832 {
<> 140:97feb9bacc10 833
<> 140:97feb9bacc10 834 q31_t diff;
<> 140:97feb9bacc10 835 q31_t r, s;
<> 140:97feb9bacc10 836
<> 140:97feb9bacc10 837 r = (q15_t) x;
<> 140:97feb9bacc10 838 s = (q15_t) y;
<> 140:97feb9bacc10 839
<> 140:97feb9bacc10 840 r = ((r >> 1) - (s >> 1));
<> 140:97feb9bacc10 841 s = (((x >> 17) - (y >> 17)) << 16);
<> 140:97feb9bacc10 842
<> 140:97feb9bacc10 843 diff = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 140:97feb9bacc10 844
<> 140:97feb9bacc10 845 return diff;
<> 140:97feb9bacc10 846 }
<> 140:97feb9bacc10 847
<> 140:97feb9bacc10 848 /*
<> 140:97feb9bacc10 849 * @brief C custom defined QASX for M3 and M0 processors
<> 140:97feb9bacc10 850 */
<> 140:97feb9bacc10 851 static __INLINE q31_t __QASX(
<> 140:97feb9bacc10 852 q31_t x,
<> 140:97feb9bacc10 853 q31_t y)
<> 140:97feb9bacc10 854 {
<> 140:97feb9bacc10 855
<> 140:97feb9bacc10 856 q31_t sum = 0;
<> 140:97feb9bacc10 857
<> 140:97feb9bacc10 858 sum =
<> 140:97feb9bacc10 859 ((sum +
<> 140:97feb9bacc10 860 clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) + (q15_t) y))) << 16) +
<> 140:97feb9bacc10 861 clip_q31_to_q15((q31_t) ((q15_t) x - (q15_t) (y >> 16)));
<> 140:97feb9bacc10 862
<> 140:97feb9bacc10 863 return sum;
<> 140:97feb9bacc10 864 }
<> 140:97feb9bacc10 865
<> 140:97feb9bacc10 866 /*
<> 140:97feb9bacc10 867 * @brief C custom defined SHASX for M3 and M0 processors
<> 140:97feb9bacc10 868 */
<> 140:97feb9bacc10 869 static __INLINE q31_t __SHASX(
<> 140:97feb9bacc10 870 q31_t x,
<> 140:97feb9bacc10 871 q31_t y)
<> 140:97feb9bacc10 872 {
<> 140:97feb9bacc10 873
<> 140:97feb9bacc10 874 q31_t sum;
<> 140:97feb9bacc10 875 q31_t r, s;
<> 140:97feb9bacc10 876
<> 140:97feb9bacc10 877 r = (q15_t) x;
<> 140:97feb9bacc10 878 s = (q15_t) y;
<> 140:97feb9bacc10 879
<> 140:97feb9bacc10 880 r = ((r >> 1) - (y >> 17));
<> 140:97feb9bacc10 881 s = (((x >> 17) + (s >> 1)) << 16);
<> 140:97feb9bacc10 882
<> 140:97feb9bacc10 883 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 140:97feb9bacc10 884
<> 140:97feb9bacc10 885 return sum;
<> 140:97feb9bacc10 886 }
<> 140:97feb9bacc10 887
<> 140:97feb9bacc10 888
<> 140:97feb9bacc10 889 /*
<> 140:97feb9bacc10 890 * @brief C custom defined QSAX for M3 and M0 processors
<> 140:97feb9bacc10 891 */
<> 140:97feb9bacc10 892 static __INLINE q31_t __QSAX(
<> 140:97feb9bacc10 893 q31_t x,
<> 140:97feb9bacc10 894 q31_t y)
<> 140:97feb9bacc10 895 {
<> 140:97feb9bacc10 896
<> 140:97feb9bacc10 897 q31_t sum = 0;
<> 140:97feb9bacc10 898
<> 140:97feb9bacc10 899 sum =
<> 140:97feb9bacc10 900 ((sum +
<> 140:97feb9bacc10 901 clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) - (q15_t) y))) << 16) +
<> 140:97feb9bacc10 902 clip_q31_to_q15((q31_t) ((q15_t) x + (q15_t) (y >> 16)));
<> 140:97feb9bacc10 903
<> 140:97feb9bacc10 904 return sum;
<> 140:97feb9bacc10 905 }
<> 140:97feb9bacc10 906
<> 140:97feb9bacc10 907 /*
<> 140:97feb9bacc10 908 * @brief C custom defined SHSAX for M3 and M0 processors
<> 140:97feb9bacc10 909 */
<> 140:97feb9bacc10 910 static __INLINE q31_t __SHSAX(
<> 140:97feb9bacc10 911 q31_t x,
<> 140:97feb9bacc10 912 q31_t y)
<> 140:97feb9bacc10 913 {
<> 140:97feb9bacc10 914
<> 140:97feb9bacc10 915 q31_t sum;
<> 140:97feb9bacc10 916 q31_t r, s;
<> 140:97feb9bacc10 917
<> 140:97feb9bacc10 918 r = (q15_t) x;
<> 140:97feb9bacc10 919 s = (q15_t) y;
<> 140:97feb9bacc10 920
<> 140:97feb9bacc10 921 r = ((r >> 1) + (y >> 17));
<> 140:97feb9bacc10 922 s = (((x >> 17) - (s >> 1)) << 16);
<> 140:97feb9bacc10 923
<> 140:97feb9bacc10 924 sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
<> 140:97feb9bacc10 925
<> 140:97feb9bacc10 926 return sum;
<> 140:97feb9bacc10 927 }
<> 140:97feb9bacc10 928
<> 140:97feb9bacc10 929 /*
<> 140:97feb9bacc10 930 * @brief C custom defined SMUSDX for M3 and M0 processors
<> 140:97feb9bacc10 931 */
<> 140:97feb9bacc10 932 static __INLINE q31_t __SMUSDX(
<> 140:97feb9bacc10 933 q31_t x,
<> 140:97feb9bacc10 934 q31_t y)
<> 140:97feb9bacc10 935 {
<> 140:97feb9bacc10 936
<> 140:97feb9bacc10 937 return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) -
<> 140:97feb9bacc10 938 ((q15_t) (x >> 16) * (q15_t) y)));
<> 140:97feb9bacc10 939 }
<> 140:97feb9bacc10 940
<> 140:97feb9bacc10 941 /*
<> 140:97feb9bacc10 942 * @brief C custom defined SMUADX for M3 and M0 processors
<> 140:97feb9bacc10 943 */
<> 140:97feb9bacc10 944 static __INLINE q31_t __SMUADX(
<> 140:97feb9bacc10 945 q31_t x,
<> 140:97feb9bacc10 946 q31_t y)
<> 140:97feb9bacc10 947 {
<> 140:97feb9bacc10 948
<> 140:97feb9bacc10 949 return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) +
<> 140:97feb9bacc10 950 ((q15_t) (x >> 16) * (q15_t) y)));
<> 140:97feb9bacc10 951 }
<> 140:97feb9bacc10 952
<> 140:97feb9bacc10 953 /*
<> 140:97feb9bacc10 954 * @brief C custom defined QADD for M3 and M0 processors
<> 140:97feb9bacc10 955 */
<> 140:97feb9bacc10 956 static __INLINE q31_t __QADD(
<> 140:97feb9bacc10 957 q31_t x,
<> 140:97feb9bacc10 958 q31_t y)
<> 140:97feb9bacc10 959 {
<> 140:97feb9bacc10 960 return clip_q63_to_q31((q63_t) x + y);
<> 140:97feb9bacc10 961 }
<> 140:97feb9bacc10 962
<> 140:97feb9bacc10 963 /*
<> 140:97feb9bacc10 964 * @brief C custom defined QSUB for M3 and M0 processors
<> 140:97feb9bacc10 965 */
<> 140:97feb9bacc10 966 static __INLINE q31_t __QSUB(
<> 140:97feb9bacc10 967 q31_t x,
<> 140:97feb9bacc10 968 q31_t y)
<> 140:97feb9bacc10 969 {
<> 140:97feb9bacc10 970 return clip_q63_to_q31((q63_t) x - y);
<> 140:97feb9bacc10 971 }
<> 140:97feb9bacc10 972
<> 140:97feb9bacc10 973 /*
<> 140:97feb9bacc10 974 * @brief C custom defined SMLAD for M3 and M0 processors
<> 140:97feb9bacc10 975 */
<> 140:97feb9bacc10 976 static __INLINE q31_t __SMLAD(
<> 140:97feb9bacc10 977 q31_t x,
<> 140:97feb9bacc10 978 q31_t y,
<> 140:97feb9bacc10 979 q31_t sum)
<> 140:97feb9bacc10 980 {
<> 140:97feb9bacc10 981
<> 140:97feb9bacc10 982 return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) +
<> 140:97feb9bacc10 983 ((q15_t) x * (q15_t) y));
<> 140:97feb9bacc10 984 }
<> 140:97feb9bacc10 985
<> 140:97feb9bacc10 986 /*
<> 140:97feb9bacc10 987 * @brief C custom defined SMLADX for M3 and M0 processors
<> 140:97feb9bacc10 988 */
<> 140:97feb9bacc10 989 static __INLINE q31_t __SMLADX(
<> 140:97feb9bacc10 990 q31_t x,
<> 140:97feb9bacc10 991 q31_t y,
<> 140:97feb9bacc10 992 q31_t sum)
<> 140:97feb9bacc10 993 {
<> 140:97feb9bacc10 994
<> 140:97feb9bacc10 995 return (sum + ((q15_t) (x >> 16) * (q15_t) (y)) +
<> 140:97feb9bacc10 996 ((q15_t) x * (q15_t) (y >> 16)));
<> 140:97feb9bacc10 997 }
<> 140:97feb9bacc10 998
<> 140:97feb9bacc10 999 /*
<> 140:97feb9bacc10 1000 * @brief C custom defined SMLSDX for M3 and M0 processors
<> 140:97feb9bacc10 1001 */
<> 140:97feb9bacc10 1002 static __INLINE q31_t __SMLSDX(
<> 140:97feb9bacc10 1003 q31_t x,
<> 140:97feb9bacc10 1004 q31_t y,
<> 140:97feb9bacc10 1005 q31_t sum)
<> 140:97feb9bacc10 1006 {
<> 140:97feb9bacc10 1007
<> 140:97feb9bacc10 1008 return (sum - ((q15_t) (x >> 16) * (q15_t) (y)) +
<> 140:97feb9bacc10 1009 ((q15_t) x * (q15_t) (y >> 16)));
<> 140:97feb9bacc10 1010 }
<> 140:97feb9bacc10 1011
<> 140:97feb9bacc10 1012 /*
<> 140:97feb9bacc10 1013 * @brief C custom defined SMLALD for M3 and M0 processors
<> 140:97feb9bacc10 1014 */
<> 140:97feb9bacc10 1015 static __INLINE q63_t __SMLALD(
<> 140:97feb9bacc10 1016 q31_t x,
<> 140:97feb9bacc10 1017 q31_t y,
<> 140:97feb9bacc10 1018 q63_t sum)
<> 140:97feb9bacc10 1019 {
<> 140:97feb9bacc10 1020
<> 140:97feb9bacc10 1021 return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) +
<> 140:97feb9bacc10 1022 ((q15_t) x * (q15_t) y));
<> 140:97feb9bacc10 1023 }
<> 140:97feb9bacc10 1024
<> 140:97feb9bacc10 1025 /*
<> 140:97feb9bacc10 1026 * @brief C custom defined SMLALDX for M3 and M0 processors
<> 140:97feb9bacc10 1027 */
<> 140:97feb9bacc10 1028 static __INLINE q63_t __SMLALDX(
<> 140:97feb9bacc10 1029 q31_t x,
<> 140:97feb9bacc10 1030 q31_t y,
<> 140:97feb9bacc10 1031 q63_t sum)
<> 140:97feb9bacc10 1032 {
<> 140:97feb9bacc10 1033
<> 140:97feb9bacc10 1034 return (sum + ((q15_t) (x >> 16) * (q15_t) y)) +
<> 140:97feb9bacc10 1035 ((q15_t) x * (q15_t) (y >> 16));
<> 140:97feb9bacc10 1036 }
<> 140:97feb9bacc10 1037
<> 140:97feb9bacc10 1038 /*
<> 140:97feb9bacc10 1039 * @brief C custom defined SMUAD for M3 and M0 processors
<> 140:97feb9bacc10 1040 */
<> 140:97feb9bacc10 1041 static __INLINE q31_t __SMUAD(
<> 140:97feb9bacc10 1042 q31_t x,
<> 140:97feb9bacc10 1043 q31_t y)
<> 140:97feb9bacc10 1044 {
<> 140:97feb9bacc10 1045
<> 140:97feb9bacc10 1046 return (((x >> 16) * (y >> 16)) +
<> 140:97feb9bacc10 1047 (((x << 16) >> 16) * ((y << 16) >> 16)));
<> 140:97feb9bacc10 1048 }
<> 140:97feb9bacc10 1049
<> 140:97feb9bacc10 1050 /*
<> 140:97feb9bacc10 1051 * @brief C custom defined SMUSD for M3 and M0 processors
<> 140:97feb9bacc10 1052 */
<> 140:97feb9bacc10 1053 static __INLINE q31_t __SMUSD(
<> 140:97feb9bacc10 1054 q31_t x,
<> 140:97feb9bacc10 1055 q31_t y)
<> 140:97feb9bacc10 1056 {
<> 140:97feb9bacc10 1057
<> 140:97feb9bacc10 1058 return (-((x >> 16) * (y >> 16)) +
<> 140:97feb9bacc10 1059 (((x << 16) >> 16) * ((y << 16) >> 16)));
<> 140:97feb9bacc10 1060 }
<> 140:97feb9bacc10 1061
<> 140:97feb9bacc10 1062
<> 140:97feb9bacc10 1063 /*
<> 140:97feb9bacc10 1064 * @brief C custom defined SXTB16 for M3 and M0 processors
<> 140:97feb9bacc10 1065 */
<> 140:97feb9bacc10 1066 static __INLINE q31_t __SXTB16(
<> 140:97feb9bacc10 1067 q31_t x)
<> 140:97feb9bacc10 1068 {
<> 140:97feb9bacc10 1069
<> 140:97feb9bacc10 1070 return ((((x << 24) >> 24) & 0x0000FFFF) |
<> 140:97feb9bacc10 1071 (((x << 8) >> 8) & 0xFFFF0000));
<> 140:97feb9bacc10 1072 }
<> 140:97feb9bacc10 1073
<> 140:97feb9bacc10 1074
<> 140:97feb9bacc10 1075 #endif /* defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
<> 140:97feb9bacc10 1076
<> 140:97feb9bacc10 1077
<> 140:97feb9bacc10 1078 /**
<> 140:97feb9bacc10 1079 * @brief Instance structure for the Q7 FIR filter.
<> 140:97feb9bacc10 1080 */
<> 140:97feb9bacc10 1081 typedef struct
<> 140:97feb9bacc10 1082 {
<> 140:97feb9bacc10 1083 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 140:97feb9bacc10 1084 q7_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 1085 q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 1086 } arm_fir_instance_q7;
<> 140:97feb9bacc10 1087
<> 140:97feb9bacc10 1088 /**
<> 140:97feb9bacc10 1089 * @brief Instance structure for the Q15 FIR filter.
<> 140:97feb9bacc10 1090 */
<> 140:97feb9bacc10 1091 typedef struct
<> 140:97feb9bacc10 1092 {
<> 140:97feb9bacc10 1093 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 140:97feb9bacc10 1094 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 1095 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 1096 } arm_fir_instance_q15;
<> 140:97feb9bacc10 1097
<> 140:97feb9bacc10 1098 /**
<> 140:97feb9bacc10 1099 * @brief Instance structure for the Q31 FIR filter.
<> 140:97feb9bacc10 1100 */
<> 140:97feb9bacc10 1101 typedef struct
<> 140:97feb9bacc10 1102 {
<> 140:97feb9bacc10 1103 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 140:97feb9bacc10 1104 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 1105 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 140:97feb9bacc10 1106 } arm_fir_instance_q31;
<> 140:97feb9bacc10 1107
<> 140:97feb9bacc10 1108 /**
<> 140:97feb9bacc10 1109 * @brief Instance structure for the floating-point FIR filter.
<> 140:97feb9bacc10 1110 */
<> 140:97feb9bacc10 1111 typedef struct
<> 140:97feb9bacc10 1112 {
<> 140:97feb9bacc10 1113 uint16_t numTaps; /**< number of filter coefficients in the filter. */
<> 140:97feb9bacc10 1114 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 1115 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 140:97feb9bacc10 1116 } arm_fir_instance_f32;
<> 140:97feb9bacc10 1117
<> 140:97feb9bacc10 1118
<> 140:97feb9bacc10 1119 /**
<> 140:97feb9bacc10 1120 * @brief Processing function for the Q7 FIR filter.
<> 140:97feb9bacc10 1121 * @param[in] *S points to an instance of the Q7 FIR filter structure.
<> 140:97feb9bacc10 1122 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1123 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1124 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1125 * @return none.
<> 140:97feb9bacc10 1126 */
<> 140:97feb9bacc10 1127 void arm_fir_q7(
<> 140:97feb9bacc10 1128 const arm_fir_instance_q7 * S,
<> 140:97feb9bacc10 1129 q7_t * pSrc,
<> 140:97feb9bacc10 1130 q7_t * pDst,
<> 140:97feb9bacc10 1131 uint32_t blockSize);
<> 140:97feb9bacc10 1132
<> 140:97feb9bacc10 1133
<> 140:97feb9bacc10 1134 /**
<> 140:97feb9bacc10 1135 * @brief Initialization function for the Q7 FIR filter.
<> 140:97feb9bacc10 1136 * @param[in,out] *S points to an instance of the Q7 FIR structure.
<> 140:97feb9bacc10 1137 * @param[in] numTaps Number of filter coefficients in the filter.
<> 140:97feb9bacc10 1138 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 1139 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 1140 * @param[in] blockSize number of samples that are processed.
<> 140:97feb9bacc10 1141 * @return none
<> 140:97feb9bacc10 1142 */
<> 140:97feb9bacc10 1143 void arm_fir_init_q7(
<> 140:97feb9bacc10 1144 arm_fir_instance_q7 * S,
<> 140:97feb9bacc10 1145 uint16_t numTaps,
<> 140:97feb9bacc10 1146 q7_t * pCoeffs,
<> 140:97feb9bacc10 1147 q7_t * pState,
<> 140:97feb9bacc10 1148 uint32_t blockSize);
<> 140:97feb9bacc10 1149
<> 140:97feb9bacc10 1150
<> 140:97feb9bacc10 1151 /**
<> 140:97feb9bacc10 1152 * @brief Processing function for the Q15 FIR filter.
<> 140:97feb9bacc10 1153 * @param[in] *S points to an instance of the Q15 FIR structure.
<> 140:97feb9bacc10 1154 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1155 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1156 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1157 * @return none.
<> 140:97feb9bacc10 1158 */
<> 140:97feb9bacc10 1159 void arm_fir_q15(
<> 140:97feb9bacc10 1160 const arm_fir_instance_q15 * S,
<> 140:97feb9bacc10 1161 q15_t * pSrc,
<> 140:97feb9bacc10 1162 q15_t * pDst,
<> 140:97feb9bacc10 1163 uint32_t blockSize);
<> 140:97feb9bacc10 1164
<> 140:97feb9bacc10 1165 /**
<> 140:97feb9bacc10 1166 * @brief Processing function for the fast Q15 FIR filter for Cortex-M3 and Cortex-M4.
<> 140:97feb9bacc10 1167 * @param[in] *S points to an instance of the Q15 FIR filter structure.
<> 140:97feb9bacc10 1168 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1169 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1170 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1171 * @return none.
<> 140:97feb9bacc10 1172 */
<> 140:97feb9bacc10 1173 void arm_fir_fast_q15(
<> 140:97feb9bacc10 1174 const arm_fir_instance_q15 * S,
<> 140:97feb9bacc10 1175 q15_t * pSrc,
<> 140:97feb9bacc10 1176 q15_t * pDst,
<> 140:97feb9bacc10 1177 uint32_t blockSize);
<> 140:97feb9bacc10 1178
<> 140:97feb9bacc10 1179 /**
<> 140:97feb9bacc10 1180 * @brief Initialization function for the Q15 FIR filter.
<> 140:97feb9bacc10 1181 * @param[in,out] *S points to an instance of the Q15 FIR filter structure.
<> 140:97feb9bacc10 1182 * @param[in] numTaps Number of filter coefficients in the filter. Must be even and greater than or equal to 4.
<> 140:97feb9bacc10 1183 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 1184 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 1185 * @param[in] blockSize number of samples that are processed at a time.
<> 140:97feb9bacc10 1186 * @return The function returns ARM_MATH_SUCCESS if initialization was successful or ARM_MATH_ARGUMENT_ERROR if
<> 140:97feb9bacc10 1187 * <code>numTaps</code> is not a supported value.
<> 140:97feb9bacc10 1188 */
<> 140:97feb9bacc10 1189
<> 140:97feb9bacc10 1190 arm_status arm_fir_init_q15(
<> 140:97feb9bacc10 1191 arm_fir_instance_q15 * S,
<> 140:97feb9bacc10 1192 uint16_t numTaps,
<> 140:97feb9bacc10 1193 q15_t * pCoeffs,
<> 140:97feb9bacc10 1194 q15_t * pState,
<> 140:97feb9bacc10 1195 uint32_t blockSize);
<> 140:97feb9bacc10 1196
<> 140:97feb9bacc10 1197 /**
<> 140:97feb9bacc10 1198 * @brief Processing function for the Q31 FIR filter.
<> 140:97feb9bacc10 1199 * @param[in] *S points to an instance of the Q31 FIR filter structure.
<> 140:97feb9bacc10 1200 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1201 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1202 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1203 * @return none.
<> 140:97feb9bacc10 1204 */
<> 140:97feb9bacc10 1205 void arm_fir_q31(
<> 140:97feb9bacc10 1206 const arm_fir_instance_q31 * S,
<> 140:97feb9bacc10 1207 q31_t * pSrc,
<> 140:97feb9bacc10 1208 q31_t * pDst,
<> 140:97feb9bacc10 1209 uint32_t blockSize);
<> 140:97feb9bacc10 1210
<> 140:97feb9bacc10 1211 /**
<> 140:97feb9bacc10 1212 * @brief Processing function for the fast Q31 FIR filter for Cortex-M3 and Cortex-M4.
<> 140:97feb9bacc10 1213 * @param[in] *S points to an instance of the Q31 FIR structure.
<> 140:97feb9bacc10 1214 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1215 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1216 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1217 * @return none.
<> 140:97feb9bacc10 1218 */
<> 140:97feb9bacc10 1219 void arm_fir_fast_q31(
<> 140:97feb9bacc10 1220 const arm_fir_instance_q31 * S,
<> 140:97feb9bacc10 1221 q31_t * pSrc,
<> 140:97feb9bacc10 1222 q31_t * pDst,
<> 140:97feb9bacc10 1223 uint32_t blockSize);
<> 140:97feb9bacc10 1224
<> 140:97feb9bacc10 1225 /**
<> 140:97feb9bacc10 1226 * @brief Initialization function for the Q31 FIR filter.
<> 140:97feb9bacc10 1227 * @param[in,out] *S points to an instance of the Q31 FIR structure.
<> 140:97feb9bacc10 1228 * @param[in] numTaps Number of filter coefficients in the filter.
<> 140:97feb9bacc10 1229 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 1230 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 1231 * @param[in] blockSize number of samples that are processed at a time.
<> 140:97feb9bacc10 1232 * @return none.
<> 140:97feb9bacc10 1233 */
<> 140:97feb9bacc10 1234 void arm_fir_init_q31(
<> 140:97feb9bacc10 1235 arm_fir_instance_q31 * S,
<> 140:97feb9bacc10 1236 uint16_t numTaps,
<> 140:97feb9bacc10 1237 q31_t * pCoeffs,
<> 140:97feb9bacc10 1238 q31_t * pState,
<> 140:97feb9bacc10 1239 uint32_t blockSize);
<> 140:97feb9bacc10 1240
<> 140:97feb9bacc10 1241 /**
<> 140:97feb9bacc10 1242 * @brief Processing function for the floating-point FIR filter.
<> 140:97feb9bacc10 1243 * @param[in] *S points to an instance of the floating-point FIR structure.
<> 140:97feb9bacc10 1244 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1245 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1246 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1247 * @return none.
<> 140:97feb9bacc10 1248 */
<> 140:97feb9bacc10 1249 void arm_fir_f32(
<> 140:97feb9bacc10 1250 const arm_fir_instance_f32 * S,
<> 140:97feb9bacc10 1251 float32_t * pSrc,
<> 140:97feb9bacc10 1252 float32_t * pDst,
<> 140:97feb9bacc10 1253 uint32_t blockSize);
<> 140:97feb9bacc10 1254
<> 140:97feb9bacc10 1255 /**
<> 140:97feb9bacc10 1256 * @brief Initialization function for the floating-point FIR filter.
<> 140:97feb9bacc10 1257 * @param[in,out] *S points to an instance of the floating-point FIR filter structure.
<> 140:97feb9bacc10 1258 * @param[in] numTaps Number of filter coefficients in the filter.
<> 140:97feb9bacc10 1259 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 1260 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 1261 * @param[in] blockSize number of samples that are processed at a time.
<> 140:97feb9bacc10 1262 * @return none.
<> 140:97feb9bacc10 1263 */
<> 140:97feb9bacc10 1264 void arm_fir_init_f32(
<> 140:97feb9bacc10 1265 arm_fir_instance_f32 * S,
<> 140:97feb9bacc10 1266 uint16_t numTaps,
<> 140:97feb9bacc10 1267 float32_t * pCoeffs,
<> 140:97feb9bacc10 1268 float32_t * pState,
<> 140:97feb9bacc10 1269 uint32_t blockSize);
<> 140:97feb9bacc10 1270
<> 140:97feb9bacc10 1271
<> 140:97feb9bacc10 1272 /**
<> 140:97feb9bacc10 1273 * @brief Instance structure for the Q15 Biquad cascade filter.
<> 140:97feb9bacc10 1274 */
<> 140:97feb9bacc10 1275 typedef struct
<> 140:97feb9bacc10 1276 {
<> 140:97feb9bacc10 1277 int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 140:97feb9bacc10 1278 q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 140:97feb9bacc10 1279 q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 140:97feb9bacc10 1280 int8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
<> 140:97feb9bacc10 1281
<> 140:97feb9bacc10 1282 } arm_biquad_casd_df1_inst_q15;
<> 140:97feb9bacc10 1283
<> 140:97feb9bacc10 1284
<> 140:97feb9bacc10 1285 /**
<> 140:97feb9bacc10 1286 * @brief Instance structure for the Q31 Biquad cascade filter.
<> 140:97feb9bacc10 1287 */
<> 140:97feb9bacc10 1288 typedef struct
<> 140:97feb9bacc10 1289 {
<> 140:97feb9bacc10 1290 uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 140:97feb9bacc10 1291 q31_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 140:97feb9bacc10 1292 q31_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 140:97feb9bacc10 1293 uint8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
<> 140:97feb9bacc10 1294
<> 140:97feb9bacc10 1295 } arm_biquad_casd_df1_inst_q31;
<> 140:97feb9bacc10 1296
<> 140:97feb9bacc10 1297 /**
<> 140:97feb9bacc10 1298 * @brief Instance structure for the floating-point Biquad cascade filter.
<> 140:97feb9bacc10 1299 */
<> 140:97feb9bacc10 1300 typedef struct
<> 140:97feb9bacc10 1301 {
<> 140:97feb9bacc10 1302 uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 140:97feb9bacc10 1303 float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
<> 140:97feb9bacc10 1304 float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
<> 140:97feb9bacc10 1305
<> 140:97feb9bacc10 1306
<> 140:97feb9bacc10 1307 } arm_biquad_casd_df1_inst_f32;
<> 140:97feb9bacc10 1308
<> 140:97feb9bacc10 1309
<> 140:97feb9bacc10 1310
<> 140:97feb9bacc10 1311 /**
<> 140:97feb9bacc10 1312 * @brief Processing function for the Q15 Biquad cascade filter.
<> 140:97feb9bacc10 1313 * @param[in] *S points to an instance of the Q15 Biquad cascade structure.
<> 140:97feb9bacc10 1314 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1315 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1316 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1317 * @return none.
<> 140:97feb9bacc10 1318 */
<> 140:97feb9bacc10 1319
<> 140:97feb9bacc10 1320 void arm_biquad_cascade_df1_q15(
<> 140:97feb9bacc10 1321 const arm_biquad_casd_df1_inst_q15 * S,
<> 140:97feb9bacc10 1322 q15_t * pSrc,
<> 140:97feb9bacc10 1323 q15_t * pDst,
<> 140:97feb9bacc10 1324 uint32_t blockSize);
<> 140:97feb9bacc10 1325
<> 140:97feb9bacc10 1326 /**
<> 140:97feb9bacc10 1327 * @brief Initialization function for the Q15 Biquad cascade filter.
<> 140:97feb9bacc10 1328 * @param[in,out] *S points to an instance of the Q15 Biquad cascade structure.
<> 140:97feb9bacc10 1329 * @param[in] numStages number of 2nd order stages in the filter.
<> 140:97feb9bacc10 1330 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 1331 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 1332 * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
<> 140:97feb9bacc10 1333 * @return none
<> 140:97feb9bacc10 1334 */
<> 140:97feb9bacc10 1335
<> 140:97feb9bacc10 1336 void arm_biquad_cascade_df1_init_q15(
<> 140:97feb9bacc10 1337 arm_biquad_casd_df1_inst_q15 * S,
<> 140:97feb9bacc10 1338 uint8_t numStages,
<> 140:97feb9bacc10 1339 q15_t * pCoeffs,
<> 140:97feb9bacc10 1340 q15_t * pState,
<> 140:97feb9bacc10 1341 int8_t postShift);
<> 140:97feb9bacc10 1342
<> 140:97feb9bacc10 1343
<> 140:97feb9bacc10 1344 /**
<> 140:97feb9bacc10 1345 * @brief Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4.
<> 140:97feb9bacc10 1346 * @param[in] *S points to an instance of the Q15 Biquad cascade structure.
<> 140:97feb9bacc10 1347 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1348 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1349 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1350 * @return none.
<> 140:97feb9bacc10 1351 */
<> 140:97feb9bacc10 1352
<> 140:97feb9bacc10 1353 void arm_biquad_cascade_df1_fast_q15(
<> 140:97feb9bacc10 1354 const arm_biquad_casd_df1_inst_q15 * S,
<> 140:97feb9bacc10 1355 q15_t * pSrc,
<> 140:97feb9bacc10 1356 q15_t * pDst,
<> 140:97feb9bacc10 1357 uint32_t blockSize);
<> 140:97feb9bacc10 1358
<> 140:97feb9bacc10 1359
<> 140:97feb9bacc10 1360 /**
<> 140:97feb9bacc10 1361 * @brief Processing function for the Q31 Biquad cascade filter
<> 140:97feb9bacc10 1362 * @param[in] *S points to an instance of the Q31 Biquad cascade structure.
<> 140:97feb9bacc10 1363 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1364 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1365 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1366 * @return none.
<> 140:97feb9bacc10 1367 */
<> 140:97feb9bacc10 1368
<> 140:97feb9bacc10 1369 void arm_biquad_cascade_df1_q31(
<> 140:97feb9bacc10 1370 const arm_biquad_casd_df1_inst_q31 * S,
<> 140:97feb9bacc10 1371 q31_t * pSrc,
<> 140:97feb9bacc10 1372 q31_t * pDst,
<> 140:97feb9bacc10 1373 uint32_t blockSize);
<> 140:97feb9bacc10 1374
<> 140:97feb9bacc10 1375 /**
<> 140:97feb9bacc10 1376 * @brief Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4.
<> 140:97feb9bacc10 1377 * @param[in] *S points to an instance of the Q31 Biquad cascade structure.
<> 140:97feb9bacc10 1378 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1379 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1380 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1381 * @return none.
<> 140:97feb9bacc10 1382 */
<> 140:97feb9bacc10 1383
<> 140:97feb9bacc10 1384 void arm_biquad_cascade_df1_fast_q31(
<> 140:97feb9bacc10 1385 const arm_biquad_casd_df1_inst_q31 * S,
<> 140:97feb9bacc10 1386 q31_t * pSrc,
<> 140:97feb9bacc10 1387 q31_t * pDst,
<> 140:97feb9bacc10 1388 uint32_t blockSize);
<> 140:97feb9bacc10 1389
<> 140:97feb9bacc10 1390 /**
<> 140:97feb9bacc10 1391 * @brief Initialization function for the Q31 Biquad cascade filter.
<> 140:97feb9bacc10 1392 * @param[in,out] *S points to an instance of the Q31 Biquad cascade structure.
<> 140:97feb9bacc10 1393 * @param[in] numStages number of 2nd order stages in the filter.
<> 140:97feb9bacc10 1394 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 1395 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 1396 * @param[in] postShift Shift to be applied to the output. Varies according to the coefficients format
<> 140:97feb9bacc10 1397 * @return none
<> 140:97feb9bacc10 1398 */
<> 140:97feb9bacc10 1399
<> 140:97feb9bacc10 1400 void arm_biquad_cascade_df1_init_q31(
<> 140:97feb9bacc10 1401 arm_biquad_casd_df1_inst_q31 * S,
<> 140:97feb9bacc10 1402 uint8_t numStages,
<> 140:97feb9bacc10 1403 q31_t * pCoeffs,
<> 140:97feb9bacc10 1404 q31_t * pState,
<> 140:97feb9bacc10 1405 int8_t postShift);
<> 140:97feb9bacc10 1406
<> 140:97feb9bacc10 1407 /**
<> 140:97feb9bacc10 1408 * @brief Processing function for the floating-point Biquad cascade filter.
<> 140:97feb9bacc10 1409 * @param[in] *S points to an instance of the floating-point Biquad cascade structure.
<> 140:97feb9bacc10 1410 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 1411 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 1412 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 1413 * @return none.
<> 140:97feb9bacc10 1414 */
<> 140:97feb9bacc10 1415
<> 140:97feb9bacc10 1416 void arm_biquad_cascade_df1_f32(
<> 140:97feb9bacc10 1417 const arm_biquad_casd_df1_inst_f32 * S,
<> 140:97feb9bacc10 1418 float32_t * pSrc,
<> 140:97feb9bacc10 1419 float32_t * pDst,
<> 140:97feb9bacc10 1420 uint32_t blockSize);
<> 140:97feb9bacc10 1421
<> 140:97feb9bacc10 1422 /**
<> 140:97feb9bacc10 1423 * @brief Initialization function for the floating-point Biquad cascade filter.
<> 140:97feb9bacc10 1424 * @param[in,out] *S points to an instance of the floating-point Biquad cascade structure.
<> 140:97feb9bacc10 1425 * @param[in] numStages number of 2nd order stages in the filter.
<> 140:97feb9bacc10 1426 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 1427 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 1428 * @return none
<> 140:97feb9bacc10 1429 */
<> 140:97feb9bacc10 1430
<> 140:97feb9bacc10 1431 void arm_biquad_cascade_df1_init_f32(
<> 140:97feb9bacc10 1432 arm_biquad_casd_df1_inst_f32 * S,
<> 140:97feb9bacc10 1433 uint8_t numStages,
<> 140:97feb9bacc10 1434 float32_t * pCoeffs,
<> 140:97feb9bacc10 1435 float32_t * pState);
<> 140:97feb9bacc10 1436
<> 140:97feb9bacc10 1437
<> 140:97feb9bacc10 1438 /**
<> 140:97feb9bacc10 1439 * @brief Instance structure for the floating-point matrix structure.
<> 140:97feb9bacc10 1440 */
<> 140:97feb9bacc10 1441
<> 140:97feb9bacc10 1442 typedef struct
<> 140:97feb9bacc10 1443 {
<> 140:97feb9bacc10 1444 uint16_t numRows; /**< number of rows of the matrix. */
<> 140:97feb9bacc10 1445 uint16_t numCols; /**< number of columns of the matrix. */
<> 140:97feb9bacc10 1446 float32_t *pData; /**< points to the data of the matrix. */
<> 140:97feb9bacc10 1447 } arm_matrix_instance_f32;
<> 140:97feb9bacc10 1448
<> 140:97feb9bacc10 1449
<> 140:97feb9bacc10 1450 /**
<> 140:97feb9bacc10 1451 * @brief Instance structure for the floating-point matrix structure.
<> 140:97feb9bacc10 1452 */
<> 140:97feb9bacc10 1453
<> 140:97feb9bacc10 1454 typedef struct
<> 140:97feb9bacc10 1455 {
<> 140:97feb9bacc10 1456 uint16_t numRows; /**< number of rows of the matrix. */
<> 140:97feb9bacc10 1457 uint16_t numCols; /**< number of columns of the matrix. */
<> 140:97feb9bacc10 1458 float64_t *pData; /**< points to the data of the matrix. */
<> 140:97feb9bacc10 1459 } arm_matrix_instance_f64;
<> 140:97feb9bacc10 1460
<> 140:97feb9bacc10 1461 /**
<> 140:97feb9bacc10 1462 * @brief Instance structure for the Q15 matrix structure.
<> 140:97feb9bacc10 1463 */
<> 140:97feb9bacc10 1464
<> 140:97feb9bacc10 1465 typedef struct
<> 140:97feb9bacc10 1466 {
<> 140:97feb9bacc10 1467 uint16_t numRows; /**< number of rows of the matrix. */
<> 140:97feb9bacc10 1468 uint16_t numCols; /**< number of columns of the matrix. */
<> 140:97feb9bacc10 1469 q15_t *pData; /**< points to the data of the matrix. */
<> 140:97feb9bacc10 1470
<> 140:97feb9bacc10 1471 } arm_matrix_instance_q15;
<> 140:97feb9bacc10 1472
<> 140:97feb9bacc10 1473 /**
<> 140:97feb9bacc10 1474 * @brief Instance structure for the Q31 matrix structure.
<> 140:97feb9bacc10 1475 */
<> 140:97feb9bacc10 1476
<> 140:97feb9bacc10 1477 typedef struct
<> 140:97feb9bacc10 1478 {
<> 140:97feb9bacc10 1479 uint16_t numRows; /**< number of rows of the matrix. */
<> 140:97feb9bacc10 1480 uint16_t numCols; /**< number of columns of the matrix. */
<> 140:97feb9bacc10 1481 q31_t *pData; /**< points to the data of the matrix. */
<> 140:97feb9bacc10 1482
<> 140:97feb9bacc10 1483 } arm_matrix_instance_q31;
<> 140:97feb9bacc10 1484
<> 140:97feb9bacc10 1485
<> 140:97feb9bacc10 1486
<> 140:97feb9bacc10 1487 /**
<> 140:97feb9bacc10 1488 * @brief Floating-point matrix addition.
<> 140:97feb9bacc10 1489 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1490 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1491 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1492 * @return The function returns either
<> 140:97feb9bacc10 1493 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1494 */
<> 140:97feb9bacc10 1495
<> 140:97feb9bacc10 1496 arm_status arm_mat_add_f32(
<> 140:97feb9bacc10 1497 const arm_matrix_instance_f32 * pSrcA,
<> 140:97feb9bacc10 1498 const arm_matrix_instance_f32 * pSrcB,
<> 140:97feb9bacc10 1499 arm_matrix_instance_f32 * pDst);
<> 140:97feb9bacc10 1500
<> 140:97feb9bacc10 1501 /**
<> 140:97feb9bacc10 1502 * @brief Q15 matrix addition.
<> 140:97feb9bacc10 1503 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1504 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1505 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1506 * @return The function returns either
<> 140:97feb9bacc10 1507 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1508 */
<> 140:97feb9bacc10 1509
<> 140:97feb9bacc10 1510 arm_status arm_mat_add_q15(
<> 140:97feb9bacc10 1511 const arm_matrix_instance_q15 * pSrcA,
<> 140:97feb9bacc10 1512 const arm_matrix_instance_q15 * pSrcB,
<> 140:97feb9bacc10 1513 arm_matrix_instance_q15 * pDst);
<> 140:97feb9bacc10 1514
<> 140:97feb9bacc10 1515 /**
<> 140:97feb9bacc10 1516 * @brief Q31 matrix addition.
<> 140:97feb9bacc10 1517 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1518 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1519 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1520 * @return The function returns either
<> 140:97feb9bacc10 1521 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1522 */
<> 140:97feb9bacc10 1523
<> 140:97feb9bacc10 1524 arm_status arm_mat_add_q31(
<> 140:97feb9bacc10 1525 const arm_matrix_instance_q31 * pSrcA,
<> 140:97feb9bacc10 1526 const arm_matrix_instance_q31 * pSrcB,
<> 140:97feb9bacc10 1527 arm_matrix_instance_q31 * pDst);
<> 140:97feb9bacc10 1528
<> 140:97feb9bacc10 1529 /**
<> 140:97feb9bacc10 1530 * @brief Floating-point, complex, matrix multiplication.
<> 140:97feb9bacc10 1531 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1532 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1533 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1534 * @return The function returns either
<> 140:97feb9bacc10 1535 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1536 */
<> 140:97feb9bacc10 1537
<> 140:97feb9bacc10 1538 arm_status arm_mat_cmplx_mult_f32(
<> 140:97feb9bacc10 1539 const arm_matrix_instance_f32 * pSrcA,
<> 140:97feb9bacc10 1540 const arm_matrix_instance_f32 * pSrcB,
<> 140:97feb9bacc10 1541 arm_matrix_instance_f32 * pDst);
<> 140:97feb9bacc10 1542
<> 140:97feb9bacc10 1543 /**
<> 140:97feb9bacc10 1544 * @brief Q15, complex, matrix multiplication.
<> 140:97feb9bacc10 1545 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1546 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1547 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1548 * @return The function returns either
<> 140:97feb9bacc10 1549 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1550 */
<> 140:97feb9bacc10 1551
<> 140:97feb9bacc10 1552 arm_status arm_mat_cmplx_mult_q15(
<> 140:97feb9bacc10 1553 const arm_matrix_instance_q15 * pSrcA,
<> 140:97feb9bacc10 1554 const arm_matrix_instance_q15 * pSrcB,
<> 140:97feb9bacc10 1555 arm_matrix_instance_q15 * pDst,
<> 140:97feb9bacc10 1556 q15_t * pScratch);
<> 140:97feb9bacc10 1557
<> 140:97feb9bacc10 1558 /**
<> 140:97feb9bacc10 1559 * @brief Q31, complex, matrix multiplication.
<> 140:97feb9bacc10 1560 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1561 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1562 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1563 * @return The function returns either
<> 140:97feb9bacc10 1564 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1565 */
<> 140:97feb9bacc10 1566
<> 140:97feb9bacc10 1567 arm_status arm_mat_cmplx_mult_q31(
<> 140:97feb9bacc10 1568 const arm_matrix_instance_q31 * pSrcA,
<> 140:97feb9bacc10 1569 const arm_matrix_instance_q31 * pSrcB,
<> 140:97feb9bacc10 1570 arm_matrix_instance_q31 * pDst);
<> 140:97feb9bacc10 1571
<> 140:97feb9bacc10 1572
<> 140:97feb9bacc10 1573 /**
<> 140:97feb9bacc10 1574 * @brief Floating-point matrix transpose.
<> 140:97feb9bacc10 1575 * @param[in] *pSrc points to the input matrix
<> 140:97feb9bacc10 1576 * @param[out] *pDst points to the output matrix
<> 140:97feb9bacc10 1577 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 140:97feb9bacc10 1578 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1579 */
<> 140:97feb9bacc10 1580
<> 140:97feb9bacc10 1581 arm_status arm_mat_trans_f32(
<> 140:97feb9bacc10 1582 const arm_matrix_instance_f32 * pSrc,
<> 140:97feb9bacc10 1583 arm_matrix_instance_f32 * pDst);
<> 140:97feb9bacc10 1584
<> 140:97feb9bacc10 1585
<> 140:97feb9bacc10 1586 /**
<> 140:97feb9bacc10 1587 * @brief Q15 matrix transpose.
<> 140:97feb9bacc10 1588 * @param[in] *pSrc points to the input matrix
<> 140:97feb9bacc10 1589 * @param[out] *pDst points to the output matrix
<> 140:97feb9bacc10 1590 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 140:97feb9bacc10 1591 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1592 */
<> 140:97feb9bacc10 1593
<> 140:97feb9bacc10 1594 arm_status arm_mat_trans_q15(
<> 140:97feb9bacc10 1595 const arm_matrix_instance_q15 * pSrc,
<> 140:97feb9bacc10 1596 arm_matrix_instance_q15 * pDst);
<> 140:97feb9bacc10 1597
<> 140:97feb9bacc10 1598 /**
<> 140:97feb9bacc10 1599 * @brief Q31 matrix transpose.
<> 140:97feb9bacc10 1600 * @param[in] *pSrc points to the input matrix
<> 140:97feb9bacc10 1601 * @param[out] *pDst points to the output matrix
<> 140:97feb9bacc10 1602 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
<> 140:97feb9bacc10 1603 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1604 */
<> 140:97feb9bacc10 1605
<> 140:97feb9bacc10 1606 arm_status arm_mat_trans_q31(
<> 140:97feb9bacc10 1607 const arm_matrix_instance_q31 * pSrc,
<> 140:97feb9bacc10 1608 arm_matrix_instance_q31 * pDst);
<> 140:97feb9bacc10 1609
<> 140:97feb9bacc10 1610
<> 140:97feb9bacc10 1611 /**
<> 140:97feb9bacc10 1612 * @brief Floating-point matrix multiplication
<> 140:97feb9bacc10 1613 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1614 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1615 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1616 * @return The function returns either
<> 140:97feb9bacc10 1617 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1618 */
<> 140:97feb9bacc10 1619
<> 140:97feb9bacc10 1620 arm_status arm_mat_mult_f32(
<> 140:97feb9bacc10 1621 const arm_matrix_instance_f32 * pSrcA,
<> 140:97feb9bacc10 1622 const arm_matrix_instance_f32 * pSrcB,
<> 140:97feb9bacc10 1623 arm_matrix_instance_f32 * pDst);
<> 140:97feb9bacc10 1624
<> 140:97feb9bacc10 1625 /**
<> 140:97feb9bacc10 1626 * @brief Q15 matrix multiplication
<> 140:97feb9bacc10 1627 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1628 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1629 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1630 * @param[in] *pState points to the array for storing intermediate results
<> 140:97feb9bacc10 1631 * @return The function returns either
<> 140:97feb9bacc10 1632 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1633 */
<> 140:97feb9bacc10 1634
<> 140:97feb9bacc10 1635 arm_status arm_mat_mult_q15(
<> 140:97feb9bacc10 1636 const arm_matrix_instance_q15 * pSrcA,
<> 140:97feb9bacc10 1637 const arm_matrix_instance_q15 * pSrcB,
<> 140:97feb9bacc10 1638 arm_matrix_instance_q15 * pDst,
<> 140:97feb9bacc10 1639 q15_t * pState);
<> 140:97feb9bacc10 1640
<> 140:97feb9bacc10 1641 /**
<> 140:97feb9bacc10 1642 * @brief Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 1643 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1644 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1645 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1646 * @param[in] *pState points to the array for storing intermediate results
<> 140:97feb9bacc10 1647 * @return The function returns either
<> 140:97feb9bacc10 1648 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1649 */
<> 140:97feb9bacc10 1650
<> 140:97feb9bacc10 1651 arm_status arm_mat_mult_fast_q15(
<> 140:97feb9bacc10 1652 const arm_matrix_instance_q15 * pSrcA,
<> 140:97feb9bacc10 1653 const arm_matrix_instance_q15 * pSrcB,
<> 140:97feb9bacc10 1654 arm_matrix_instance_q15 * pDst,
<> 140:97feb9bacc10 1655 q15_t * pState);
<> 140:97feb9bacc10 1656
<> 140:97feb9bacc10 1657 /**
<> 140:97feb9bacc10 1658 * @brief Q31 matrix multiplication
<> 140:97feb9bacc10 1659 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1660 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1661 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1662 * @return The function returns either
<> 140:97feb9bacc10 1663 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1664 */
<> 140:97feb9bacc10 1665
<> 140:97feb9bacc10 1666 arm_status arm_mat_mult_q31(
<> 140:97feb9bacc10 1667 const arm_matrix_instance_q31 * pSrcA,
<> 140:97feb9bacc10 1668 const arm_matrix_instance_q31 * pSrcB,
<> 140:97feb9bacc10 1669 arm_matrix_instance_q31 * pDst);
<> 140:97feb9bacc10 1670
<> 140:97feb9bacc10 1671 /**
<> 140:97feb9bacc10 1672 * @brief Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 1673 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1674 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1675 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1676 * @return The function returns either
<> 140:97feb9bacc10 1677 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1678 */
<> 140:97feb9bacc10 1679
<> 140:97feb9bacc10 1680 arm_status arm_mat_mult_fast_q31(
<> 140:97feb9bacc10 1681 const arm_matrix_instance_q31 * pSrcA,
<> 140:97feb9bacc10 1682 const arm_matrix_instance_q31 * pSrcB,
<> 140:97feb9bacc10 1683 arm_matrix_instance_q31 * pDst);
<> 140:97feb9bacc10 1684
<> 140:97feb9bacc10 1685
<> 140:97feb9bacc10 1686 /**
<> 140:97feb9bacc10 1687 * @brief Floating-point matrix subtraction
<> 140:97feb9bacc10 1688 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1689 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1690 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1691 * @return The function returns either
<> 140:97feb9bacc10 1692 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1693 */
<> 140:97feb9bacc10 1694
<> 140:97feb9bacc10 1695 arm_status arm_mat_sub_f32(
<> 140:97feb9bacc10 1696 const arm_matrix_instance_f32 * pSrcA,
<> 140:97feb9bacc10 1697 const arm_matrix_instance_f32 * pSrcB,
<> 140:97feb9bacc10 1698 arm_matrix_instance_f32 * pDst);
<> 140:97feb9bacc10 1699
<> 140:97feb9bacc10 1700 /**
<> 140:97feb9bacc10 1701 * @brief Q15 matrix subtraction
<> 140:97feb9bacc10 1702 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1703 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1704 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1705 * @return The function returns either
<> 140:97feb9bacc10 1706 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1707 */
<> 140:97feb9bacc10 1708
<> 140:97feb9bacc10 1709 arm_status arm_mat_sub_q15(
<> 140:97feb9bacc10 1710 const arm_matrix_instance_q15 * pSrcA,
<> 140:97feb9bacc10 1711 const arm_matrix_instance_q15 * pSrcB,
<> 140:97feb9bacc10 1712 arm_matrix_instance_q15 * pDst);
<> 140:97feb9bacc10 1713
<> 140:97feb9bacc10 1714 /**
<> 140:97feb9bacc10 1715 * @brief Q31 matrix subtraction
<> 140:97feb9bacc10 1716 * @param[in] *pSrcA points to the first input matrix structure
<> 140:97feb9bacc10 1717 * @param[in] *pSrcB points to the second input matrix structure
<> 140:97feb9bacc10 1718 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1719 * @return The function returns either
<> 140:97feb9bacc10 1720 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1721 */
<> 140:97feb9bacc10 1722
<> 140:97feb9bacc10 1723 arm_status arm_mat_sub_q31(
<> 140:97feb9bacc10 1724 const arm_matrix_instance_q31 * pSrcA,
<> 140:97feb9bacc10 1725 const arm_matrix_instance_q31 * pSrcB,
<> 140:97feb9bacc10 1726 arm_matrix_instance_q31 * pDst);
<> 140:97feb9bacc10 1727
<> 140:97feb9bacc10 1728 /**
<> 140:97feb9bacc10 1729 * @brief Floating-point matrix scaling.
<> 140:97feb9bacc10 1730 * @param[in] *pSrc points to the input matrix
<> 140:97feb9bacc10 1731 * @param[in] scale scale factor
<> 140:97feb9bacc10 1732 * @param[out] *pDst points to the output matrix
<> 140:97feb9bacc10 1733 * @return The function returns either
<> 140:97feb9bacc10 1734 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1735 */
<> 140:97feb9bacc10 1736
<> 140:97feb9bacc10 1737 arm_status arm_mat_scale_f32(
<> 140:97feb9bacc10 1738 const arm_matrix_instance_f32 * pSrc,
<> 140:97feb9bacc10 1739 float32_t scale,
<> 140:97feb9bacc10 1740 arm_matrix_instance_f32 * pDst);
<> 140:97feb9bacc10 1741
<> 140:97feb9bacc10 1742 /**
<> 140:97feb9bacc10 1743 * @brief Q15 matrix scaling.
<> 140:97feb9bacc10 1744 * @param[in] *pSrc points to input matrix
<> 140:97feb9bacc10 1745 * @param[in] scaleFract fractional portion of the scale factor
<> 140:97feb9bacc10 1746 * @param[in] shift number of bits to shift the result by
<> 140:97feb9bacc10 1747 * @param[out] *pDst points to output matrix
<> 140:97feb9bacc10 1748 * @return The function returns either
<> 140:97feb9bacc10 1749 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1750 */
<> 140:97feb9bacc10 1751
<> 140:97feb9bacc10 1752 arm_status arm_mat_scale_q15(
<> 140:97feb9bacc10 1753 const arm_matrix_instance_q15 * pSrc,
<> 140:97feb9bacc10 1754 q15_t scaleFract,
<> 140:97feb9bacc10 1755 int32_t shift,
<> 140:97feb9bacc10 1756 arm_matrix_instance_q15 * pDst);
<> 140:97feb9bacc10 1757
<> 140:97feb9bacc10 1758 /**
<> 140:97feb9bacc10 1759 * @brief Q31 matrix scaling.
<> 140:97feb9bacc10 1760 * @param[in] *pSrc points to input matrix
<> 140:97feb9bacc10 1761 * @param[in] scaleFract fractional portion of the scale factor
<> 140:97feb9bacc10 1762 * @param[in] shift number of bits to shift the result by
<> 140:97feb9bacc10 1763 * @param[out] *pDst points to output matrix structure
<> 140:97feb9bacc10 1764 * @return The function returns either
<> 140:97feb9bacc10 1765 * <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
<> 140:97feb9bacc10 1766 */
<> 140:97feb9bacc10 1767
<> 140:97feb9bacc10 1768 arm_status arm_mat_scale_q31(
<> 140:97feb9bacc10 1769 const arm_matrix_instance_q31 * pSrc,
<> 140:97feb9bacc10 1770 q31_t scaleFract,
<> 140:97feb9bacc10 1771 int32_t shift,
<> 140:97feb9bacc10 1772 arm_matrix_instance_q31 * pDst);
<> 140:97feb9bacc10 1773
<> 140:97feb9bacc10 1774
<> 140:97feb9bacc10 1775 /**
<> 140:97feb9bacc10 1776 * @brief Q31 matrix initialization.
<> 140:97feb9bacc10 1777 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 140:97feb9bacc10 1778 * @param[in] nRows number of rows in the matrix.
<> 140:97feb9bacc10 1779 * @param[in] nColumns number of columns in the matrix.
<> 140:97feb9bacc10 1780 * @param[in] *pData points to the matrix data array.
<> 140:97feb9bacc10 1781 * @return none
<> 140:97feb9bacc10 1782 */
<> 140:97feb9bacc10 1783
<> 140:97feb9bacc10 1784 void arm_mat_init_q31(
<> 140:97feb9bacc10 1785 arm_matrix_instance_q31 * S,
<> 140:97feb9bacc10 1786 uint16_t nRows,
<> 140:97feb9bacc10 1787 uint16_t nColumns,
<> 140:97feb9bacc10 1788 q31_t * pData);
<> 140:97feb9bacc10 1789
<> 140:97feb9bacc10 1790 /**
<> 140:97feb9bacc10 1791 * @brief Q15 matrix initialization.
<> 140:97feb9bacc10 1792 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 140:97feb9bacc10 1793 * @param[in] nRows number of rows in the matrix.
<> 140:97feb9bacc10 1794 * @param[in] nColumns number of columns in the matrix.
<> 140:97feb9bacc10 1795 * @param[in] *pData points to the matrix data array.
<> 140:97feb9bacc10 1796 * @return none
<> 140:97feb9bacc10 1797 */
<> 140:97feb9bacc10 1798
<> 140:97feb9bacc10 1799 void arm_mat_init_q15(
<> 140:97feb9bacc10 1800 arm_matrix_instance_q15 * S,
<> 140:97feb9bacc10 1801 uint16_t nRows,
<> 140:97feb9bacc10 1802 uint16_t nColumns,
<> 140:97feb9bacc10 1803 q15_t * pData);
<> 140:97feb9bacc10 1804
<> 140:97feb9bacc10 1805 /**
<> 140:97feb9bacc10 1806 * @brief Floating-point matrix initialization.
<> 140:97feb9bacc10 1807 * @param[in,out] *S points to an instance of the floating-point matrix structure.
<> 140:97feb9bacc10 1808 * @param[in] nRows number of rows in the matrix.
<> 140:97feb9bacc10 1809 * @param[in] nColumns number of columns in the matrix.
<> 140:97feb9bacc10 1810 * @param[in] *pData points to the matrix data array.
<> 140:97feb9bacc10 1811 * @return none
<> 140:97feb9bacc10 1812 */
<> 140:97feb9bacc10 1813
<> 140:97feb9bacc10 1814 void arm_mat_init_f32(
<> 140:97feb9bacc10 1815 arm_matrix_instance_f32 * S,
<> 140:97feb9bacc10 1816 uint16_t nRows,
<> 140:97feb9bacc10 1817 uint16_t nColumns,
<> 140:97feb9bacc10 1818 float32_t * pData);
<> 140:97feb9bacc10 1819
<> 140:97feb9bacc10 1820
<> 140:97feb9bacc10 1821
<> 140:97feb9bacc10 1822 /**
<> 140:97feb9bacc10 1823 * @brief Instance structure for the Q15 PID Control.
<> 140:97feb9bacc10 1824 */
<> 140:97feb9bacc10 1825 typedef struct
<> 140:97feb9bacc10 1826 {
<> 140:97feb9bacc10 1827 q15_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 140:97feb9bacc10 1828 #ifdef ARM_MATH_CM0_FAMILY
<> 140:97feb9bacc10 1829 q15_t A1;
<> 140:97feb9bacc10 1830 q15_t A2;
<> 140:97feb9bacc10 1831 #else
<> 140:97feb9bacc10 1832 q31_t A1; /**< The derived gain A1 = -Kp - 2Kd | Kd.*/
<> 140:97feb9bacc10 1833 #endif
<> 140:97feb9bacc10 1834 q15_t state[3]; /**< The state array of length 3. */
<> 140:97feb9bacc10 1835 q15_t Kp; /**< The proportional gain. */
<> 140:97feb9bacc10 1836 q15_t Ki; /**< The integral gain. */
<> 140:97feb9bacc10 1837 q15_t Kd; /**< The derivative gain. */
<> 140:97feb9bacc10 1838 } arm_pid_instance_q15;
<> 140:97feb9bacc10 1839
<> 140:97feb9bacc10 1840 /**
<> 140:97feb9bacc10 1841 * @brief Instance structure for the Q31 PID Control.
<> 140:97feb9bacc10 1842 */
<> 140:97feb9bacc10 1843 typedef struct
<> 140:97feb9bacc10 1844 {
<> 140:97feb9bacc10 1845 q31_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 140:97feb9bacc10 1846 q31_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
<> 140:97feb9bacc10 1847 q31_t A2; /**< The derived gain, A2 = Kd . */
<> 140:97feb9bacc10 1848 q31_t state[3]; /**< The state array of length 3. */
<> 140:97feb9bacc10 1849 q31_t Kp; /**< The proportional gain. */
<> 140:97feb9bacc10 1850 q31_t Ki; /**< The integral gain. */
<> 140:97feb9bacc10 1851 q31_t Kd; /**< The derivative gain. */
<> 140:97feb9bacc10 1852
<> 140:97feb9bacc10 1853 } arm_pid_instance_q31;
<> 140:97feb9bacc10 1854
<> 140:97feb9bacc10 1855 /**
<> 140:97feb9bacc10 1856 * @brief Instance structure for the floating-point PID Control.
<> 140:97feb9bacc10 1857 */
<> 140:97feb9bacc10 1858 typedef struct
<> 140:97feb9bacc10 1859 {
<> 140:97feb9bacc10 1860 float32_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
<> 140:97feb9bacc10 1861 float32_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
<> 140:97feb9bacc10 1862 float32_t A2; /**< The derived gain, A2 = Kd . */
<> 140:97feb9bacc10 1863 float32_t state[3]; /**< The state array of length 3. */
<> 140:97feb9bacc10 1864 float32_t Kp; /**< The proportional gain. */
<> 140:97feb9bacc10 1865 float32_t Ki; /**< The integral gain. */
<> 140:97feb9bacc10 1866 float32_t Kd; /**< The derivative gain. */
<> 140:97feb9bacc10 1867 } arm_pid_instance_f32;
<> 140:97feb9bacc10 1868
<> 140:97feb9bacc10 1869
<> 140:97feb9bacc10 1870
<> 140:97feb9bacc10 1871 /**
<> 140:97feb9bacc10 1872 * @brief Initialization function for the floating-point PID Control.
<> 140:97feb9bacc10 1873 * @param[in,out] *S points to an instance of the PID structure.
<> 140:97feb9bacc10 1874 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 140:97feb9bacc10 1875 * @return none.
<> 140:97feb9bacc10 1876 */
<> 140:97feb9bacc10 1877 void arm_pid_init_f32(
<> 140:97feb9bacc10 1878 arm_pid_instance_f32 * S,
<> 140:97feb9bacc10 1879 int32_t resetStateFlag);
<> 140:97feb9bacc10 1880
<> 140:97feb9bacc10 1881 /**
<> 140:97feb9bacc10 1882 * @brief Reset function for the floating-point PID Control.
<> 140:97feb9bacc10 1883 * @param[in,out] *S is an instance of the floating-point PID Control structure
<> 140:97feb9bacc10 1884 * @return none
<> 140:97feb9bacc10 1885 */
<> 140:97feb9bacc10 1886 void arm_pid_reset_f32(
<> 140:97feb9bacc10 1887 arm_pid_instance_f32 * S);
<> 140:97feb9bacc10 1888
<> 140:97feb9bacc10 1889
<> 140:97feb9bacc10 1890 /**
<> 140:97feb9bacc10 1891 * @brief Initialization function for the Q31 PID Control.
<> 140:97feb9bacc10 1892 * @param[in,out] *S points to an instance of the Q15 PID structure.
<> 140:97feb9bacc10 1893 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 140:97feb9bacc10 1894 * @return none.
<> 140:97feb9bacc10 1895 */
<> 140:97feb9bacc10 1896 void arm_pid_init_q31(
<> 140:97feb9bacc10 1897 arm_pid_instance_q31 * S,
<> 140:97feb9bacc10 1898 int32_t resetStateFlag);
<> 140:97feb9bacc10 1899
<> 140:97feb9bacc10 1900
<> 140:97feb9bacc10 1901 /**
<> 140:97feb9bacc10 1902 * @brief Reset function for the Q31 PID Control.
<> 140:97feb9bacc10 1903 * @param[in,out] *S points to an instance of the Q31 PID Control structure
<> 140:97feb9bacc10 1904 * @return none
<> 140:97feb9bacc10 1905 */
<> 140:97feb9bacc10 1906
<> 140:97feb9bacc10 1907 void arm_pid_reset_q31(
<> 140:97feb9bacc10 1908 arm_pid_instance_q31 * S);
<> 140:97feb9bacc10 1909
<> 140:97feb9bacc10 1910 /**
<> 140:97feb9bacc10 1911 * @brief Initialization function for the Q15 PID Control.
<> 140:97feb9bacc10 1912 * @param[in,out] *S points to an instance of the Q15 PID structure.
<> 140:97feb9bacc10 1913 * @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the state.
<> 140:97feb9bacc10 1914 * @return none.
<> 140:97feb9bacc10 1915 */
<> 140:97feb9bacc10 1916 void arm_pid_init_q15(
<> 140:97feb9bacc10 1917 arm_pid_instance_q15 * S,
<> 140:97feb9bacc10 1918 int32_t resetStateFlag);
<> 140:97feb9bacc10 1919
<> 140:97feb9bacc10 1920 /**
<> 140:97feb9bacc10 1921 * @brief Reset function for the Q15 PID Control.
<> 140:97feb9bacc10 1922 * @param[in,out] *S points to an instance of the q15 PID Control structure
<> 140:97feb9bacc10 1923 * @return none
<> 140:97feb9bacc10 1924 */
<> 140:97feb9bacc10 1925 void arm_pid_reset_q15(
<> 140:97feb9bacc10 1926 arm_pid_instance_q15 * S);
<> 140:97feb9bacc10 1927
<> 140:97feb9bacc10 1928
<> 140:97feb9bacc10 1929 /**
<> 140:97feb9bacc10 1930 * @brief Instance structure for the floating-point Linear Interpolate function.
<> 140:97feb9bacc10 1931 */
<> 140:97feb9bacc10 1932 typedef struct
<> 140:97feb9bacc10 1933 {
<> 140:97feb9bacc10 1934 uint32_t nValues; /**< nValues */
<> 140:97feb9bacc10 1935 float32_t x1; /**< x1 */
<> 140:97feb9bacc10 1936 float32_t xSpacing; /**< xSpacing */
<> 140:97feb9bacc10 1937 float32_t *pYData; /**< pointer to the table of Y values */
<> 140:97feb9bacc10 1938 } arm_linear_interp_instance_f32;
<> 140:97feb9bacc10 1939
<> 140:97feb9bacc10 1940 /**
<> 140:97feb9bacc10 1941 * @brief Instance structure for the floating-point bilinear interpolation function.
<> 140:97feb9bacc10 1942 */
<> 140:97feb9bacc10 1943
<> 140:97feb9bacc10 1944 typedef struct
<> 140:97feb9bacc10 1945 {
<> 140:97feb9bacc10 1946 uint16_t numRows; /**< number of rows in the data table. */
<> 140:97feb9bacc10 1947 uint16_t numCols; /**< number of columns in the data table. */
<> 140:97feb9bacc10 1948 float32_t *pData; /**< points to the data table. */
<> 140:97feb9bacc10 1949 } arm_bilinear_interp_instance_f32;
<> 140:97feb9bacc10 1950
<> 140:97feb9bacc10 1951 /**
<> 140:97feb9bacc10 1952 * @brief Instance structure for the Q31 bilinear interpolation function.
<> 140:97feb9bacc10 1953 */
<> 140:97feb9bacc10 1954
<> 140:97feb9bacc10 1955 typedef struct
<> 140:97feb9bacc10 1956 {
<> 140:97feb9bacc10 1957 uint16_t numRows; /**< number of rows in the data table. */
<> 140:97feb9bacc10 1958 uint16_t numCols; /**< number of columns in the data table. */
<> 140:97feb9bacc10 1959 q31_t *pData; /**< points to the data table. */
<> 140:97feb9bacc10 1960 } arm_bilinear_interp_instance_q31;
<> 140:97feb9bacc10 1961
<> 140:97feb9bacc10 1962 /**
<> 140:97feb9bacc10 1963 * @brief Instance structure for the Q15 bilinear interpolation function.
<> 140:97feb9bacc10 1964 */
<> 140:97feb9bacc10 1965
<> 140:97feb9bacc10 1966 typedef struct
<> 140:97feb9bacc10 1967 {
<> 140:97feb9bacc10 1968 uint16_t numRows; /**< number of rows in the data table. */
<> 140:97feb9bacc10 1969 uint16_t numCols; /**< number of columns in the data table. */
<> 140:97feb9bacc10 1970 q15_t *pData; /**< points to the data table. */
<> 140:97feb9bacc10 1971 } arm_bilinear_interp_instance_q15;
<> 140:97feb9bacc10 1972
<> 140:97feb9bacc10 1973 /**
<> 140:97feb9bacc10 1974 * @brief Instance structure for the Q15 bilinear interpolation function.
<> 140:97feb9bacc10 1975 */
<> 140:97feb9bacc10 1976
<> 140:97feb9bacc10 1977 typedef struct
<> 140:97feb9bacc10 1978 {
<> 140:97feb9bacc10 1979 uint16_t numRows; /**< number of rows in the data table. */
<> 140:97feb9bacc10 1980 uint16_t numCols; /**< number of columns in the data table. */
<> 140:97feb9bacc10 1981 q7_t *pData; /**< points to the data table. */
<> 140:97feb9bacc10 1982 } arm_bilinear_interp_instance_q7;
<> 140:97feb9bacc10 1983
<> 140:97feb9bacc10 1984
<> 140:97feb9bacc10 1985 /**
<> 140:97feb9bacc10 1986 * @brief Q7 vector multiplication.
<> 140:97feb9bacc10 1987 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 1988 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 1989 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 1990 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 1991 * @return none.
<> 140:97feb9bacc10 1992 */
<> 140:97feb9bacc10 1993
<> 140:97feb9bacc10 1994 void arm_mult_q7(
<> 140:97feb9bacc10 1995 q7_t * pSrcA,
<> 140:97feb9bacc10 1996 q7_t * pSrcB,
<> 140:97feb9bacc10 1997 q7_t * pDst,
<> 140:97feb9bacc10 1998 uint32_t blockSize);
<> 140:97feb9bacc10 1999
<> 140:97feb9bacc10 2000 /**
<> 140:97feb9bacc10 2001 * @brief Q15 vector multiplication.
<> 140:97feb9bacc10 2002 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2003 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2004 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2005 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2006 * @return none.
<> 140:97feb9bacc10 2007 */
<> 140:97feb9bacc10 2008
<> 140:97feb9bacc10 2009 void arm_mult_q15(
<> 140:97feb9bacc10 2010 q15_t * pSrcA,
<> 140:97feb9bacc10 2011 q15_t * pSrcB,
<> 140:97feb9bacc10 2012 q15_t * pDst,
<> 140:97feb9bacc10 2013 uint32_t blockSize);
<> 140:97feb9bacc10 2014
<> 140:97feb9bacc10 2015 /**
<> 140:97feb9bacc10 2016 * @brief Q31 vector multiplication.
<> 140:97feb9bacc10 2017 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2018 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2019 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2020 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2021 * @return none.
<> 140:97feb9bacc10 2022 */
<> 140:97feb9bacc10 2023
<> 140:97feb9bacc10 2024 void arm_mult_q31(
<> 140:97feb9bacc10 2025 q31_t * pSrcA,
<> 140:97feb9bacc10 2026 q31_t * pSrcB,
<> 140:97feb9bacc10 2027 q31_t * pDst,
<> 140:97feb9bacc10 2028 uint32_t blockSize);
<> 140:97feb9bacc10 2029
<> 140:97feb9bacc10 2030 /**
<> 140:97feb9bacc10 2031 * @brief Floating-point vector multiplication.
<> 140:97feb9bacc10 2032 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2033 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2034 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2035 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2036 * @return none.
<> 140:97feb9bacc10 2037 */
<> 140:97feb9bacc10 2038
<> 140:97feb9bacc10 2039 void arm_mult_f32(
<> 140:97feb9bacc10 2040 float32_t * pSrcA,
<> 140:97feb9bacc10 2041 float32_t * pSrcB,
<> 140:97feb9bacc10 2042 float32_t * pDst,
<> 140:97feb9bacc10 2043 uint32_t blockSize);
<> 140:97feb9bacc10 2044
<> 140:97feb9bacc10 2045
<> 140:97feb9bacc10 2046
<> 140:97feb9bacc10 2047
<> 140:97feb9bacc10 2048
<> 140:97feb9bacc10 2049
<> 140:97feb9bacc10 2050 /**
<> 140:97feb9bacc10 2051 * @brief Instance structure for the Q15 CFFT/CIFFT function.
<> 140:97feb9bacc10 2052 */
<> 140:97feb9bacc10 2053
<> 140:97feb9bacc10 2054 typedef struct
<> 140:97feb9bacc10 2055 {
<> 140:97feb9bacc10 2056 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2057 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 140:97feb9bacc10 2058 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 140:97feb9bacc10 2059 q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */
<> 140:97feb9bacc10 2060 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2061 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2062 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 140:97feb9bacc10 2063 } arm_cfft_radix2_instance_q15;
<> 140:97feb9bacc10 2064
<> 140:97feb9bacc10 2065 /* Deprecated */
<> 140:97feb9bacc10 2066 arm_status arm_cfft_radix2_init_q15(
<> 140:97feb9bacc10 2067 arm_cfft_radix2_instance_q15 * S,
<> 140:97feb9bacc10 2068 uint16_t fftLen,
<> 140:97feb9bacc10 2069 uint8_t ifftFlag,
<> 140:97feb9bacc10 2070 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2071
<> 140:97feb9bacc10 2072 /* Deprecated */
<> 140:97feb9bacc10 2073 void arm_cfft_radix2_q15(
<> 140:97feb9bacc10 2074 const arm_cfft_radix2_instance_q15 * S,
<> 140:97feb9bacc10 2075 q15_t * pSrc);
<> 140:97feb9bacc10 2076
<> 140:97feb9bacc10 2077
<> 140:97feb9bacc10 2078
<> 140:97feb9bacc10 2079 /**
<> 140:97feb9bacc10 2080 * @brief Instance structure for the Q15 CFFT/CIFFT function.
<> 140:97feb9bacc10 2081 */
<> 140:97feb9bacc10 2082
<> 140:97feb9bacc10 2083 typedef struct
<> 140:97feb9bacc10 2084 {
<> 140:97feb9bacc10 2085 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2086 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 140:97feb9bacc10 2087 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 140:97feb9bacc10 2088 q15_t *pTwiddle; /**< points to the twiddle factor table. */
<> 140:97feb9bacc10 2089 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2090 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2091 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 140:97feb9bacc10 2092 } arm_cfft_radix4_instance_q15;
<> 140:97feb9bacc10 2093
<> 140:97feb9bacc10 2094 /* Deprecated */
<> 140:97feb9bacc10 2095 arm_status arm_cfft_radix4_init_q15(
<> 140:97feb9bacc10 2096 arm_cfft_radix4_instance_q15 * S,
<> 140:97feb9bacc10 2097 uint16_t fftLen,
<> 140:97feb9bacc10 2098 uint8_t ifftFlag,
<> 140:97feb9bacc10 2099 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2100
<> 140:97feb9bacc10 2101 /* Deprecated */
<> 140:97feb9bacc10 2102 void arm_cfft_radix4_q15(
<> 140:97feb9bacc10 2103 const arm_cfft_radix4_instance_q15 * S,
<> 140:97feb9bacc10 2104 q15_t * pSrc);
<> 140:97feb9bacc10 2105
<> 140:97feb9bacc10 2106 /**
<> 140:97feb9bacc10 2107 * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
<> 140:97feb9bacc10 2108 */
<> 140:97feb9bacc10 2109
<> 140:97feb9bacc10 2110 typedef struct
<> 140:97feb9bacc10 2111 {
<> 140:97feb9bacc10 2112 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2113 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 140:97feb9bacc10 2114 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 140:97feb9bacc10 2115 q31_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 140:97feb9bacc10 2116 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2117 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2118 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 140:97feb9bacc10 2119 } arm_cfft_radix2_instance_q31;
<> 140:97feb9bacc10 2120
<> 140:97feb9bacc10 2121 /* Deprecated */
<> 140:97feb9bacc10 2122 arm_status arm_cfft_radix2_init_q31(
<> 140:97feb9bacc10 2123 arm_cfft_radix2_instance_q31 * S,
<> 140:97feb9bacc10 2124 uint16_t fftLen,
<> 140:97feb9bacc10 2125 uint8_t ifftFlag,
<> 140:97feb9bacc10 2126 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2127
<> 140:97feb9bacc10 2128 /* Deprecated */
<> 140:97feb9bacc10 2129 void arm_cfft_radix2_q31(
<> 140:97feb9bacc10 2130 const arm_cfft_radix2_instance_q31 * S,
<> 140:97feb9bacc10 2131 q31_t * pSrc);
<> 140:97feb9bacc10 2132
<> 140:97feb9bacc10 2133 /**
<> 140:97feb9bacc10 2134 * @brief Instance structure for the Q31 CFFT/CIFFT function.
<> 140:97feb9bacc10 2135 */
<> 140:97feb9bacc10 2136
<> 140:97feb9bacc10 2137 typedef struct
<> 140:97feb9bacc10 2138 {
<> 140:97feb9bacc10 2139 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2140 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 140:97feb9bacc10 2141 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 140:97feb9bacc10 2142 q31_t *pTwiddle; /**< points to the twiddle factor table. */
<> 140:97feb9bacc10 2143 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2144 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2145 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 140:97feb9bacc10 2146 } arm_cfft_radix4_instance_q31;
<> 140:97feb9bacc10 2147
<> 140:97feb9bacc10 2148 /* Deprecated */
<> 140:97feb9bacc10 2149 void arm_cfft_radix4_q31(
<> 140:97feb9bacc10 2150 const arm_cfft_radix4_instance_q31 * S,
<> 140:97feb9bacc10 2151 q31_t * pSrc);
<> 140:97feb9bacc10 2152
<> 140:97feb9bacc10 2153 /* Deprecated */
<> 140:97feb9bacc10 2154 arm_status arm_cfft_radix4_init_q31(
<> 140:97feb9bacc10 2155 arm_cfft_radix4_instance_q31 * S,
<> 140:97feb9bacc10 2156 uint16_t fftLen,
<> 140:97feb9bacc10 2157 uint8_t ifftFlag,
<> 140:97feb9bacc10 2158 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2159
<> 140:97feb9bacc10 2160 /**
<> 140:97feb9bacc10 2161 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 140:97feb9bacc10 2162 */
<> 140:97feb9bacc10 2163
<> 140:97feb9bacc10 2164 typedef struct
<> 140:97feb9bacc10 2165 {
<> 140:97feb9bacc10 2166 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2167 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 140:97feb9bacc10 2168 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 140:97feb9bacc10 2169 float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 140:97feb9bacc10 2170 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2171 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2172 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 140:97feb9bacc10 2173 float32_t onebyfftLen; /**< value of 1/fftLen. */
<> 140:97feb9bacc10 2174 } arm_cfft_radix2_instance_f32;
<> 140:97feb9bacc10 2175
<> 140:97feb9bacc10 2176 /* Deprecated */
<> 140:97feb9bacc10 2177 arm_status arm_cfft_radix2_init_f32(
<> 140:97feb9bacc10 2178 arm_cfft_radix2_instance_f32 * S,
<> 140:97feb9bacc10 2179 uint16_t fftLen,
<> 140:97feb9bacc10 2180 uint8_t ifftFlag,
<> 140:97feb9bacc10 2181 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2182
<> 140:97feb9bacc10 2183 /* Deprecated */
<> 140:97feb9bacc10 2184 void arm_cfft_radix2_f32(
<> 140:97feb9bacc10 2185 const arm_cfft_radix2_instance_f32 * S,
<> 140:97feb9bacc10 2186 float32_t * pSrc);
<> 140:97feb9bacc10 2187
<> 140:97feb9bacc10 2188 /**
<> 140:97feb9bacc10 2189 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 140:97feb9bacc10 2190 */
<> 140:97feb9bacc10 2191
<> 140:97feb9bacc10 2192 typedef struct
<> 140:97feb9bacc10 2193 {
<> 140:97feb9bacc10 2194 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2195 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
<> 140:97feb9bacc10 2196 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
<> 140:97feb9bacc10 2197 float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 140:97feb9bacc10 2198 uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2199 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2200 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
<> 140:97feb9bacc10 2201 float32_t onebyfftLen; /**< value of 1/fftLen. */
<> 140:97feb9bacc10 2202 } arm_cfft_radix4_instance_f32;
<> 140:97feb9bacc10 2203
<> 140:97feb9bacc10 2204 /* Deprecated */
<> 140:97feb9bacc10 2205 arm_status arm_cfft_radix4_init_f32(
<> 140:97feb9bacc10 2206 arm_cfft_radix4_instance_f32 * S,
<> 140:97feb9bacc10 2207 uint16_t fftLen,
<> 140:97feb9bacc10 2208 uint8_t ifftFlag,
<> 140:97feb9bacc10 2209 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2210
<> 140:97feb9bacc10 2211 /* Deprecated */
<> 140:97feb9bacc10 2212 void arm_cfft_radix4_f32(
<> 140:97feb9bacc10 2213 const arm_cfft_radix4_instance_f32 * S,
<> 140:97feb9bacc10 2214 float32_t * pSrc);
<> 140:97feb9bacc10 2215
<> 140:97feb9bacc10 2216 /**
<> 140:97feb9bacc10 2217 * @brief Instance structure for the fixed-point CFFT/CIFFT function.
<> 140:97feb9bacc10 2218 */
<> 140:97feb9bacc10 2219
<> 140:97feb9bacc10 2220 typedef struct
<> 140:97feb9bacc10 2221 {
<> 140:97feb9bacc10 2222 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2223 const q15_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 140:97feb9bacc10 2224 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2225 uint16_t bitRevLength; /**< bit reversal table length. */
<> 140:97feb9bacc10 2226 } arm_cfft_instance_q15;
<> 140:97feb9bacc10 2227
<> 140:97feb9bacc10 2228 void arm_cfft_q15(
<> 140:97feb9bacc10 2229 const arm_cfft_instance_q15 * S,
<> 140:97feb9bacc10 2230 q15_t * p1,
<> 140:97feb9bacc10 2231 uint8_t ifftFlag,
<> 140:97feb9bacc10 2232 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2233
<> 140:97feb9bacc10 2234 /**
<> 140:97feb9bacc10 2235 * @brief Instance structure for the fixed-point CFFT/CIFFT function.
<> 140:97feb9bacc10 2236 */
<> 140:97feb9bacc10 2237
<> 140:97feb9bacc10 2238 typedef struct
<> 140:97feb9bacc10 2239 {
<> 140:97feb9bacc10 2240 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2241 const q31_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 140:97feb9bacc10 2242 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2243 uint16_t bitRevLength; /**< bit reversal table length. */
<> 140:97feb9bacc10 2244 } arm_cfft_instance_q31;
<> 140:97feb9bacc10 2245
<> 140:97feb9bacc10 2246 void arm_cfft_q31(
<> 140:97feb9bacc10 2247 const arm_cfft_instance_q31 * S,
<> 140:97feb9bacc10 2248 q31_t * p1,
<> 140:97feb9bacc10 2249 uint8_t ifftFlag,
<> 140:97feb9bacc10 2250 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2251
<> 140:97feb9bacc10 2252 /**
<> 140:97feb9bacc10 2253 * @brief Instance structure for the floating-point CFFT/CIFFT function.
<> 140:97feb9bacc10 2254 */
<> 140:97feb9bacc10 2255
<> 140:97feb9bacc10 2256 typedef struct
<> 140:97feb9bacc10 2257 {
<> 140:97feb9bacc10 2258 uint16_t fftLen; /**< length of the FFT. */
<> 140:97feb9bacc10 2259 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
<> 140:97feb9bacc10 2260 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
<> 140:97feb9bacc10 2261 uint16_t bitRevLength; /**< bit reversal table length. */
<> 140:97feb9bacc10 2262 } arm_cfft_instance_f32;
<> 140:97feb9bacc10 2263
<> 140:97feb9bacc10 2264 void arm_cfft_f32(
<> 140:97feb9bacc10 2265 const arm_cfft_instance_f32 * S,
<> 140:97feb9bacc10 2266 float32_t * p1,
<> 140:97feb9bacc10 2267 uint8_t ifftFlag,
<> 140:97feb9bacc10 2268 uint8_t bitReverseFlag);
<> 140:97feb9bacc10 2269
<> 140:97feb9bacc10 2270 /**
<> 140:97feb9bacc10 2271 * @brief Instance structure for the Q15 RFFT/RIFFT function.
<> 140:97feb9bacc10 2272 */
<> 140:97feb9bacc10 2273
<> 140:97feb9bacc10 2274 typedef struct
<> 140:97feb9bacc10 2275 {
<> 140:97feb9bacc10 2276 uint32_t fftLenReal; /**< length of the real FFT. */
<> 140:97feb9bacc10 2277 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 140:97feb9bacc10 2278 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 140:97feb9bacc10 2279 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2280 q15_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 140:97feb9bacc10 2281 q15_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 140:97feb9bacc10 2282 const arm_cfft_instance_q15 *pCfft; /**< points to the complex FFT instance. */
<> 140:97feb9bacc10 2283 } arm_rfft_instance_q15;
<> 140:97feb9bacc10 2284
<> 140:97feb9bacc10 2285 arm_status arm_rfft_init_q15(
<> 140:97feb9bacc10 2286 arm_rfft_instance_q15 * S,
<> 140:97feb9bacc10 2287 uint32_t fftLenReal,
<> 140:97feb9bacc10 2288 uint32_t ifftFlagR,
<> 140:97feb9bacc10 2289 uint32_t bitReverseFlag);
<> 140:97feb9bacc10 2290
<> 140:97feb9bacc10 2291 void arm_rfft_q15(
<> 140:97feb9bacc10 2292 const arm_rfft_instance_q15 * S,
<> 140:97feb9bacc10 2293 q15_t * pSrc,
<> 140:97feb9bacc10 2294 q15_t * pDst);
<> 140:97feb9bacc10 2295
<> 140:97feb9bacc10 2296 /**
<> 140:97feb9bacc10 2297 * @brief Instance structure for the Q31 RFFT/RIFFT function.
<> 140:97feb9bacc10 2298 */
<> 140:97feb9bacc10 2299
<> 140:97feb9bacc10 2300 typedef struct
<> 140:97feb9bacc10 2301 {
<> 140:97feb9bacc10 2302 uint32_t fftLenReal; /**< length of the real FFT. */
<> 140:97feb9bacc10 2303 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 140:97feb9bacc10 2304 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 140:97feb9bacc10 2305 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2306 q31_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 140:97feb9bacc10 2307 q31_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 140:97feb9bacc10 2308 const arm_cfft_instance_q31 *pCfft; /**< points to the complex FFT instance. */
<> 140:97feb9bacc10 2309 } arm_rfft_instance_q31;
<> 140:97feb9bacc10 2310
<> 140:97feb9bacc10 2311 arm_status arm_rfft_init_q31(
<> 140:97feb9bacc10 2312 arm_rfft_instance_q31 * S,
<> 140:97feb9bacc10 2313 uint32_t fftLenReal,
<> 140:97feb9bacc10 2314 uint32_t ifftFlagR,
<> 140:97feb9bacc10 2315 uint32_t bitReverseFlag);
<> 140:97feb9bacc10 2316
<> 140:97feb9bacc10 2317 void arm_rfft_q31(
<> 140:97feb9bacc10 2318 const arm_rfft_instance_q31 * S,
<> 140:97feb9bacc10 2319 q31_t * pSrc,
<> 140:97feb9bacc10 2320 q31_t * pDst);
<> 140:97feb9bacc10 2321
<> 140:97feb9bacc10 2322 /**
<> 140:97feb9bacc10 2323 * @brief Instance structure for the floating-point RFFT/RIFFT function.
<> 140:97feb9bacc10 2324 */
<> 140:97feb9bacc10 2325
<> 140:97feb9bacc10 2326 typedef struct
<> 140:97feb9bacc10 2327 {
<> 140:97feb9bacc10 2328 uint32_t fftLenReal; /**< length of the real FFT. */
<> 140:97feb9bacc10 2329 uint16_t fftLenBy2; /**< length of the complex FFT. */
<> 140:97feb9bacc10 2330 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
<> 140:97feb9bacc10 2331 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
<> 140:97feb9bacc10 2332 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
<> 140:97feb9bacc10 2333 float32_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
<> 140:97feb9bacc10 2334 float32_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
<> 140:97feb9bacc10 2335 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
<> 140:97feb9bacc10 2336 } arm_rfft_instance_f32;
<> 140:97feb9bacc10 2337
<> 140:97feb9bacc10 2338 arm_status arm_rfft_init_f32(
<> 140:97feb9bacc10 2339 arm_rfft_instance_f32 * S,
<> 140:97feb9bacc10 2340 arm_cfft_radix4_instance_f32 * S_CFFT,
<> 140:97feb9bacc10 2341 uint32_t fftLenReal,
<> 140:97feb9bacc10 2342 uint32_t ifftFlagR,
<> 140:97feb9bacc10 2343 uint32_t bitReverseFlag);
<> 140:97feb9bacc10 2344
<> 140:97feb9bacc10 2345 void arm_rfft_f32(
<> 140:97feb9bacc10 2346 const arm_rfft_instance_f32 * S,
<> 140:97feb9bacc10 2347 float32_t * pSrc,
<> 140:97feb9bacc10 2348 float32_t * pDst);
<> 140:97feb9bacc10 2349
<> 140:97feb9bacc10 2350 /**
<> 140:97feb9bacc10 2351 * @brief Instance structure for the floating-point RFFT/RIFFT function.
<> 140:97feb9bacc10 2352 */
<> 140:97feb9bacc10 2353
<> 140:97feb9bacc10 2354 typedef struct
<> 140:97feb9bacc10 2355 {
<> 140:97feb9bacc10 2356 arm_cfft_instance_f32 Sint; /**< Internal CFFT structure. */
<> 140:97feb9bacc10 2357 uint16_t fftLenRFFT; /**< length of the real sequence */
<> 140:97feb9bacc10 2358 float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */
<> 140:97feb9bacc10 2359 } arm_rfft_fast_instance_f32 ;
<> 140:97feb9bacc10 2360
<> 140:97feb9bacc10 2361 arm_status arm_rfft_fast_init_f32 (
<> 140:97feb9bacc10 2362 arm_rfft_fast_instance_f32 * S,
<> 140:97feb9bacc10 2363 uint16_t fftLen);
<> 140:97feb9bacc10 2364
<> 140:97feb9bacc10 2365 void arm_rfft_fast_f32(
<> 140:97feb9bacc10 2366 arm_rfft_fast_instance_f32 * S,
<> 140:97feb9bacc10 2367 float32_t * p, float32_t * pOut,
<> 140:97feb9bacc10 2368 uint8_t ifftFlag);
<> 140:97feb9bacc10 2369
<> 140:97feb9bacc10 2370 /**
<> 140:97feb9bacc10 2371 * @brief Instance structure for the floating-point DCT4/IDCT4 function.
<> 140:97feb9bacc10 2372 */
<> 140:97feb9bacc10 2373
<> 140:97feb9bacc10 2374 typedef struct
<> 140:97feb9bacc10 2375 {
<> 140:97feb9bacc10 2376 uint16_t N; /**< length of the DCT4. */
<> 140:97feb9bacc10 2377 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 140:97feb9bacc10 2378 float32_t normalize; /**< normalizing factor. */
<> 140:97feb9bacc10 2379 float32_t *pTwiddle; /**< points to the twiddle factor table. */
<> 140:97feb9bacc10 2380 float32_t *pCosFactor; /**< points to the cosFactor table. */
<> 140:97feb9bacc10 2381 arm_rfft_instance_f32 *pRfft; /**< points to the real FFT instance. */
<> 140:97feb9bacc10 2382 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
<> 140:97feb9bacc10 2383 } arm_dct4_instance_f32;
<> 140:97feb9bacc10 2384
<> 140:97feb9bacc10 2385 /**
<> 140:97feb9bacc10 2386 * @brief Initialization function for the floating-point DCT4/IDCT4.
<> 140:97feb9bacc10 2387 * @param[in,out] *S points to an instance of floating-point DCT4/IDCT4 structure.
<> 140:97feb9bacc10 2388 * @param[in] *S_RFFT points to an instance of floating-point RFFT/RIFFT structure.
<> 140:97feb9bacc10 2389 * @param[in] *S_CFFT points to an instance of floating-point CFFT/CIFFT structure.
<> 140:97feb9bacc10 2390 * @param[in] N length of the DCT4.
<> 140:97feb9bacc10 2391 * @param[in] Nby2 half of the length of the DCT4.
<> 140:97feb9bacc10 2392 * @param[in] normalize normalizing factor.
<> 140:97feb9bacc10 2393 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLenReal</code> is not a supported transform length.
<> 140:97feb9bacc10 2394 */
<> 140:97feb9bacc10 2395
<> 140:97feb9bacc10 2396 arm_status arm_dct4_init_f32(
<> 140:97feb9bacc10 2397 arm_dct4_instance_f32 * S,
<> 140:97feb9bacc10 2398 arm_rfft_instance_f32 * S_RFFT,
<> 140:97feb9bacc10 2399 arm_cfft_radix4_instance_f32 * S_CFFT,
<> 140:97feb9bacc10 2400 uint16_t N,
<> 140:97feb9bacc10 2401 uint16_t Nby2,
<> 140:97feb9bacc10 2402 float32_t normalize);
<> 140:97feb9bacc10 2403
<> 140:97feb9bacc10 2404 /**
<> 140:97feb9bacc10 2405 * @brief Processing function for the floating-point DCT4/IDCT4.
<> 140:97feb9bacc10 2406 * @param[in] *S points to an instance of the floating-point DCT4/IDCT4 structure.
<> 140:97feb9bacc10 2407 * @param[in] *pState points to state buffer.
<> 140:97feb9bacc10 2408 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 140:97feb9bacc10 2409 * @return none.
<> 140:97feb9bacc10 2410 */
<> 140:97feb9bacc10 2411
<> 140:97feb9bacc10 2412 void arm_dct4_f32(
<> 140:97feb9bacc10 2413 const arm_dct4_instance_f32 * S,
<> 140:97feb9bacc10 2414 float32_t * pState,
<> 140:97feb9bacc10 2415 float32_t * pInlineBuffer);
<> 140:97feb9bacc10 2416
<> 140:97feb9bacc10 2417 /**
<> 140:97feb9bacc10 2418 * @brief Instance structure for the Q31 DCT4/IDCT4 function.
<> 140:97feb9bacc10 2419 */
<> 140:97feb9bacc10 2420
<> 140:97feb9bacc10 2421 typedef struct
<> 140:97feb9bacc10 2422 {
<> 140:97feb9bacc10 2423 uint16_t N; /**< length of the DCT4. */
<> 140:97feb9bacc10 2424 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 140:97feb9bacc10 2425 q31_t normalize; /**< normalizing factor. */
<> 140:97feb9bacc10 2426 q31_t *pTwiddle; /**< points to the twiddle factor table. */
<> 140:97feb9bacc10 2427 q31_t *pCosFactor; /**< points to the cosFactor table. */
<> 140:97feb9bacc10 2428 arm_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */
<> 140:97feb9bacc10 2429 arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
<> 140:97feb9bacc10 2430 } arm_dct4_instance_q31;
<> 140:97feb9bacc10 2431
<> 140:97feb9bacc10 2432 /**
<> 140:97feb9bacc10 2433 * @brief Initialization function for the Q31 DCT4/IDCT4.
<> 140:97feb9bacc10 2434 * @param[in,out] *S points to an instance of Q31 DCT4/IDCT4 structure.
<> 140:97feb9bacc10 2435 * @param[in] *S_RFFT points to an instance of Q31 RFFT/RIFFT structure
<> 140:97feb9bacc10 2436 * @param[in] *S_CFFT points to an instance of Q31 CFFT/CIFFT structure
<> 140:97feb9bacc10 2437 * @param[in] N length of the DCT4.
<> 140:97feb9bacc10 2438 * @param[in] Nby2 half of the length of the DCT4.
<> 140:97feb9bacc10 2439 * @param[in] normalize normalizing factor.
<> 140:97feb9bacc10 2440 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length.
<> 140:97feb9bacc10 2441 */
<> 140:97feb9bacc10 2442
<> 140:97feb9bacc10 2443 arm_status arm_dct4_init_q31(
<> 140:97feb9bacc10 2444 arm_dct4_instance_q31 * S,
<> 140:97feb9bacc10 2445 arm_rfft_instance_q31 * S_RFFT,
<> 140:97feb9bacc10 2446 arm_cfft_radix4_instance_q31 * S_CFFT,
<> 140:97feb9bacc10 2447 uint16_t N,
<> 140:97feb9bacc10 2448 uint16_t Nby2,
<> 140:97feb9bacc10 2449 q31_t normalize);
<> 140:97feb9bacc10 2450
<> 140:97feb9bacc10 2451 /**
<> 140:97feb9bacc10 2452 * @brief Processing function for the Q31 DCT4/IDCT4.
<> 140:97feb9bacc10 2453 * @param[in] *S points to an instance of the Q31 DCT4 structure.
<> 140:97feb9bacc10 2454 * @param[in] *pState points to state buffer.
<> 140:97feb9bacc10 2455 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 140:97feb9bacc10 2456 * @return none.
<> 140:97feb9bacc10 2457 */
<> 140:97feb9bacc10 2458
<> 140:97feb9bacc10 2459 void arm_dct4_q31(
<> 140:97feb9bacc10 2460 const arm_dct4_instance_q31 * S,
<> 140:97feb9bacc10 2461 q31_t * pState,
<> 140:97feb9bacc10 2462 q31_t * pInlineBuffer);
<> 140:97feb9bacc10 2463
<> 140:97feb9bacc10 2464 /**
<> 140:97feb9bacc10 2465 * @brief Instance structure for the Q15 DCT4/IDCT4 function.
<> 140:97feb9bacc10 2466 */
<> 140:97feb9bacc10 2467
<> 140:97feb9bacc10 2468 typedef struct
<> 140:97feb9bacc10 2469 {
<> 140:97feb9bacc10 2470 uint16_t N; /**< length of the DCT4. */
<> 140:97feb9bacc10 2471 uint16_t Nby2; /**< half of the length of the DCT4. */
<> 140:97feb9bacc10 2472 q15_t normalize; /**< normalizing factor. */
<> 140:97feb9bacc10 2473 q15_t *pTwiddle; /**< points to the twiddle factor table. */
<> 140:97feb9bacc10 2474 q15_t *pCosFactor; /**< points to the cosFactor table. */
<> 140:97feb9bacc10 2475 arm_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */
<> 140:97feb9bacc10 2476 arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
<> 140:97feb9bacc10 2477 } arm_dct4_instance_q15;
<> 140:97feb9bacc10 2478
<> 140:97feb9bacc10 2479 /**
<> 140:97feb9bacc10 2480 * @brief Initialization function for the Q15 DCT4/IDCT4.
<> 140:97feb9bacc10 2481 * @param[in,out] *S points to an instance of Q15 DCT4/IDCT4 structure.
<> 140:97feb9bacc10 2482 * @param[in] *S_RFFT points to an instance of Q15 RFFT/RIFFT structure.
<> 140:97feb9bacc10 2483 * @param[in] *S_CFFT points to an instance of Q15 CFFT/CIFFT structure.
<> 140:97feb9bacc10 2484 * @param[in] N length of the DCT4.
<> 140:97feb9bacc10 2485 * @param[in] Nby2 half of the length of the DCT4.
<> 140:97feb9bacc10 2486 * @param[in] normalize normalizing factor.
<> 140:97feb9bacc10 2487 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length.
<> 140:97feb9bacc10 2488 */
<> 140:97feb9bacc10 2489
<> 140:97feb9bacc10 2490 arm_status arm_dct4_init_q15(
<> 140:97feb9bacc10 2491 arm_dct4_instance_q15 * S,
<> 140:97feb9bacc10 2492 arm_rfft_instance_q15 * S_RFFT,
<> 140:97feb9bacc10 2493 arm_cfft_radix4_instance_q15 * S_CFFT,
<> 140:97feb9bacc10 2494 uint16_t N,
<> 140:97feb9bacc10 2495 uint16_t Nby2,
<> 140:97feb9bacc10 2496 q15_t normalize);
<> 140:97feb9bacc10 2497
<> 140:97feb9bacc10 2498 /**
<> 140:97feb9bacc10 2499 * @brief Processing function for the Q15 DCT4/IDCT4.
<> 140:97feb9bacc10 2500 * @param[in] *S points to an instance of the Q15 DCT4 structure.
<> 140:97feb9bacc10 2501 * @param[in] *pState points to state buffer.
<> 140:97feb9bacc10 2502 * @param[in,out] *pInlineBuffer points to the in-place input and output buffer.
<> 140:97feb9bacc10 2503 * @return none.
<> 140:97feb9bacc10 2504 */
<> 140:97feb9bacc10 2505
<> 140:97feb9bacc10 2506 void arm_dct4_q15(
<> 140:97feb9bacc10 2507 const arm_dct4_instance_q15 * S,
<> 140:97feb9bacc10 2508 q15_t * pState,
<> 140:97feb9bacc10 2509 q15_t * pInlineBuffer);
<> 140:97feb9bacc10 2510
<> 140:97feb9bacc10 2511 /**
<> 140:97feb9bacc10 2512 * @brief Floating-point vector addition.
<> 140:97feb9bacc10 2513 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2514 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2515 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2516 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2517 * @return none.
<> 140:97feb9bacc10 2518 */
<> 140:97feb9bacc10 2519
<> 140:97feb9bacc10 2520 void arm_add_f32(
<> 140:97feb9bacc10 2521 float32_t * pSrcA,
<> 140:97feb9bacc10 2522 float32_t * pSrcB,
<> 140:97feb9bacc10 2523 float32_t * pDst,
<> 140:97feb9bacc10 2524 uint32_t blockSize);
<> 140:97feb9bacc10 2525
<> 140:97feb9bacc10 2526 /**
<> 140:97feb9bacc10 2527 * @brief Q7 vector addition.
<> 140:97feb9bacc10 2528 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2529 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2530 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2531 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2532 * @return none.
<> 140:97feb9bacc10 2533 */
<> 140:97feb9bacc10 2534
<> 140:97feb9bacc10 2535 void arm_add_q7(
<> 140:97feb9bacc10 2536 q7_t * pSrcA,
<> 140:97feb9bacc10 2537 q7_t * pSrcB,
<> 140:97feb9bacc10 2538 q7_t * pDst,
<> 140:97feb9bacc10 2539 uint32_t blockSize);
<> 140:97feb9bacc10 2540
<> 140:97feb9bacc10 2541 /**
<> 140:97feb9bacc10 2542 * @brief Q15 vector addition.
<> 140:97feb9bacc10 2543 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2544 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2545 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2546 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2547 * @return none.
<> 140:97feb9bacc10 2548 */
<> 140:97feb9bacc10 2549
<> 140:97feb9bacc10 2550 void arm_add_q15(
<> 140:97feb9bacc10 2551 q15_t * pSrcA,
<> 140:97feb9bacc10 2552 q15_t * pSrcB,
<> 140:97feb9bacc10 2553 q15_t * pDst,
<> 140:97feb9bacc10 2554 uint32_t blockSize);
<> 140:97feb9bacc10 2555
<> 140:97feb9bacc10 2556 /**
<> 140:97feb9bacc10 2557 * @brief Q31 vector addition.
<> 140:97feb9bacc10 2558 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2559 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2560 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2561 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2562 * @return none.
<> 140:97feb9bacc10 2563 */
<> 140:97feb9bacc10 2564
<> 140:97feb9bacc10 2565 void arm_add_q31(
<> 140:97feb9bacc10 2566 q31_t * pSrcA,
<> 140:97feb9bacc10 2567 q31_t * pSrcB,
<> 140:97feb9bacc10 2568 q31_t * pDst,
<> 140:97feb9bacc10 2569 uint32_t blockSize);
<> 140:97feb9bacc10 2570
<> 140:97feb9bacc10 2571 /**
<> 140:97feb9bacc10 2572 * @brief Floating-point vector subtraction.
<> 140:97feb9bacc10 2573 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2574 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2575 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2576 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2577 * @return none.
<> 140:97feb9bacc10 2578 */
<> 140:97feb9bacc10 2579
<> 140:97feb9bacc10 2580 void arm_sub_f32(
<> 140:97feb9bacc10 2581 float32_t * pSrcA,
<> 140:97feb9bacc10 2582 float32_t * pSrcB,
<> 140:97feb9bacc10 2583 float32_t * pDst,
<> 140:97feb9bacc10 2584 uint32_t blockSize);
<> 140:97feb9bacc10 2585
<> 140:97feb9bacc10 2586 /**
<> 140:97feb9bacc10 2587 * @brief Q7 vector subtraction.
<> 140:97feb9bacc10 2588 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2589 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2590 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2591 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2592 * @return none.
<> 140:97feb9bacc10 2593 */
<> 140:97feb9bacc10 2594
<> 140:97feb9bacc10 2595 void arm_sub_q7(
<> 140:97feb9bacc10 2596 q7_t * pSrcA,
<> 140:97feb9bacc10 2597 q7_t * pSrcB,
<> 140:97feb9bacc10 2598 q7_t * pDst,
<> 140:97feb9bacc10 2599 uint32_t blockSize);
<> 140:97feb9bacc10 2600
<> 140:97feb9bacc10 2601 /**
<> 140:97feb9bacc10 2602 * @brief Q15 vector subtraction.
<> 140:97feb9bacc10 2603 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2604 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2605 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2606 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2607 * @return none.
<> 140:97feb9bacc10 2608 */
<> 140:97feb9bacc10 2609
<> 140:97feb9bacc10 2610 void arm_sub_q15(
<> 140:97feb9bacc10 2611 q15_t * pSrcA,
<> 140:97feb9bacc10 2612 q15_t * pSrcB,
<> 140:97feb9bacc10 2613 q15_t * pDst,
<> 140:97feb9bacc10 2614 uint32_t blockSize);
<> 140:97feb9bacc10 2615
<> 140:97feb9bacc10 2616 /**
<> 140:97feb9bacc10 2617 * @brief Q31 vector subtraction.
<> 140:97feb9bacc10 2618 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2619 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2620 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2621 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2622 * @return none.
<> 140:97feb9bacc10 2623 */
<> 140:97feb9bacc10 2624
<> 140:97feb9bacc10 2625 void arm_sub_q31(
<> 140:97feb9bacc10 2626 q31_t * pSrcA,
<> 140:97feb9bacc10 2627 q31_t * pSrcB,
<> 140:97feb9bacc10 2628 q31_t * pDst,
<> 140:97feb9bacc10 2629 uint32_t blockSize);
<> 140:97feb9bacc10 2630
<> 140:97feb9bacc10 2631 /**
<> 140:97feb9bacc10 2632 * @brief Multiplies a floating-point vector by a scalar.
<> 140:97feb9bacc10 2633 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2634 * @param[in] scale scale factor to be applied
<> 140:97feb9bacc10 2635 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2636 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2637 * @return none.
<> 140:97feb9bacc10 2638 */
<> 140:97feb9bacc10 2639
<> 140:97feb9bacc10 2640 void arm_scale_f32(
<> 140:97feb9bacc10 2641 float32_t * pSrc,
<> 140:97feb9bacc10 2642 float32_t scale,
<> 140:97feb9bacc10 2643 float32_t * pDst,
<> 140:97feb9bacc10 2644 uint32_t blockSize);
<> 140:97feb9bacc10 2645
<> 140:97feb9bacc10 2646 /**
<> 140:97feb9bacc10 2647 * @brief Multiplies a Q7 vector by a scalar.
<> 140:97feb9bacc10 2648 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2649 * @param[in] scaleFract fractional portion of the scale value
<> 140:97feb9bacc10 2650 * @param[in] shift number of bits to shift the result by
<> 140:97feb9bacc10 2651 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2652 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2653 * @return none.
<> 140:97feb9bacc10 2654 */
<> 140:97feb9bacc10 2655
<> 140:97feb9bacc10 2656 void arm_scale_q7(
<> 140:97feb9bacc10 2657 q7_t * pSrc,
<> 140:97feb9bacc10 2658 q7_t scaleFract,
<> 140:97feb9bacc10 2659 int8_t shift,
<> 140:97feb9bacc10 2660 q7_t * pDst,
<> 140:97feb9bacc10 2661 uint32_t blockSize);
<> 140:97feb9bacc10 2662
<> 140:97feb9bacc10 2663 /**
<> 140:97feb9bacc10 2664 * @brief Multiplies a Q15 vector by a scalar.
<> 140:97feb9bacc10 2665 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2666 * @param[in] scaleFract fractional portion of the scale value
<> 140:97feb9bacc10 2667 * @param[in] shift number of bits to shift the result by
<> 140:97feb9bacc10 2668 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2669 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2670 * @return none.
<> 140:97feb9bacc10 2671 */
<> 140:97feb9bacc10 2672
<> 140:97feb9bacc10 2673 void arm_scale_q15(
<> 140:97feb9bacc10 2674 q15_t * pSrc,
<> 140:97feb9bacc10 2675 q15_t scaleFract,
<> 140:97feb9bacc10 2676 int8_t shift,
<> 140:97feb9bacc10 2677 q15_t * pDst,
<> 140:97feb9bacc10 2678 uint32_t blockSize);
<> 140:97feb9bacc10 2679
<> 140:97feb9bacc10 2680 /**
<> 140:97feb9bacc10 2681 * @brief Multiplies a Q31 vector by a scalar.
<> 140:97feb9bacc10 2682 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2683 * @param[in] scaleFract fractional portion of the scale value
<> 140:97feb9bacc10 2684 * @param[in] shift number of bits to shift the result by
<> 140:97feb9bacc10 2685 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2686 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2687 * @return none.
<> 140:97feb9bacc10 2688 */
<> 140:97feb9bacc10 2689
<> 140:97feb9bacc10 2690 void arm_scale_q31(
<> 140:97feb9bacc10 2691 q31_t * pSrc,
<> 140:97feb9bacc10 2692 q31_t scaleFract,
<> 140:97feb9bacc10 2693 int8_t shift,
<> 140:97feb9bacc10 2694 q31_t * pDst,
<> 140:97feb9bacc10 2695 uint32_t blockSize);
<> 140:97feb9bacc10 2696
<> 140:97feb9bacc10 2697 /**
<> 140:97feb9bacc10 2698 * @brief Q7 vector absolute value.
<> 140:97feb9bacc10 2699 * @param[in] *pSrc points to the input buffer
<> 140:97feb9bacc10 2700 * @param[out] *pDst points to the output buffer
<> 140:97feb9bacc10 2701 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2702 * @return none.
<> 140:97feb9bacc10 2703 */
<> 140:97feb9bacc10 2704
<> 140:97feb9bacc10 2705 void arm_abs_q7(
<> 140:97feb9bacc10 2706 q7_t * pSrc,
<> 140:97feb9bacc10 2707 q7_t * pDst,
<> 140:97feb9bacc10 2708 uint32_t blockSize);
<> 140:97feb9bacc10 2709
<> 140:97feb9bacc10 2710 /**
<> 140:97feb9bacc10 2711 * @brief Floating-point vector absolute value.
<> 140:97feb9bacc10 2712 * @param[in] *pSrc points to the input buffer
<> 140:97feb9bacc10 2713 * @param[out] *pDst points to the output buffer
<> 140:97feb9bacc10 2714 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2715 * @return none.
<> 140:97feb9bacc10 2716 */
<> 140:97feb9bacc10 2717
<> 140:97feb9bacc10 2718 void arm_abs_f32(
<> 140:97feb9bacc10 2719 float32_t * pSrc,
<> 140:97feb9bacc10 2720 float32_t * pDst,
<> 140:97feb9bacc10 2721 uint32_t blockSize);
<> 140:97feb9bacc10 2722
<> 140:97feb9bacc10 2723 /**
<> 140:97feb9bacc10 2724 * @brief Q15 vector absolute value.
<> 140:97feb9bacc10 2725 * @param[in] *pSrc points to the input buffer
<> 140:97feb9bacc10 2726 * @param[out] *pDst points to the output buffer
<> 140:97feb9bacc10 2727 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2728 * @return none.
<> 140:97feb9bacc10 2729 */
<> 140:97feb9bacc10 2730
<> 140:97feb9bacc10 2731 void arm_abs_q15(
<> 140:97feb9bacc10 2732 q15_t * pSrc,
<> 140:97feb9bacc10 2733 q15_t * pDst,
<> 140:97feb9bacc10 2734 uint32_t blockSize);
<> 140:97feb9bacc10 2735
<> 140:97feb9bacc10 2736 /**
<> 140:97feb9bacc10 2737 * @brief Q31 vector absolute value.
<> 140:97feb9bacc10 2738 * @param[in] *pSrc points to the input buffer
<> 140:97feb9bacc10 2739 * @param[out] *pDst points to the output buffer
<> 140:97feb9bacc10 2740 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2741 * @return none.
<> 140:97feb9bacc10 2742 */
<> 140:97feb9bacc10 2743
<> 140:97feb9bacc10 2744 void arm_abs_q31(
<> 140:97feb9bacc10 2745 q31_t * pSrc,
<> 140:97feb9bacc10 2746 q31_t * pDst,
<> 140:97feb9bacc10 2747 uint32_t blockSize);
<> 140:97feb9bacc10 2748
<> 140:97feb9bacc10 2749 /**
<> 140:97feb9bacc10 2750 * @brief Dot product of floating-point vectors.
<> 140:97feb9bacc10 2751 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2752 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2753 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2754 * @param[out] *result output result returned here
<> 140:97feb9bacc10 2755 * @return none.
<> 140:97feb9bacc10 2756 */
<> 140:97feb9bacc10 2757
<> 140:97feb9bacc10 2758 void arm_dot_prod_f32(
<> 140:97feb9bacc10 2759 float32_t * pSrcA,
<> 140:97feb9bacc10 2760 float32_t * pSrcB,
<> 140:97feb9bacc10 2761 uint32_t blockSize,
<> 140:97feb9bacc10 2762 float32_t * result);
<> 140:97feb9bacc10 2763
<> 140:97feb9bacc10 2764 /**
<> 140:97feb9bacc10 2765 * @brief Dot product of Q7 vectors.
<> 140:97feb9bacc10 2766 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2767 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2768 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2769 * @param[out] *result output result returned here
<> 140:97feb9bacc10 2770 * @return none.
<> 140:97feb9bacc10 2771 */
<> 140:97feb9bacc10 2772
<> 140:97feb9bacc10 2773 void arm_dot_prod_q7(
<> 140:97feb9bacc10 2774 q7_t * pSrcA,
<> 140:97feb9bacc10 2775 q7_t * pSrcB,
<> 140:97feb9bacc10 2776 uint32_t blockSize,
<> 140:97feb9bacc10 2777 q31_t * result);
<> 140:97feb9bacc10 2778
<> 140:97feb9bacc10 2779 /**
<> 140:97feb9bacc10 2780 * @brief Dot product of Q15 vectors.
<> 140:97feb9bacc10 2781 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2782 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2783 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2784 * @param[out] *result output result returned here
<> 140:97feb9bacc10 2785 * @return none.
<> 140:97feb9bacc10 2786 */
<> 140:97feb9bacc10 2787
<> 140:97feb9bacc10 2788 void arm_dot_prod_q15(
<> 140:97feb9bacc10 2789 q15_t * pSrcA,
<> 140:97feb9bacc10 2790 q15_t * pSrcB,
<> 140:97feb9bacc10 2791 uint32_t blockSize,
<> 140:97feb9bacc10 2792 q63_t * result);
<> 140:97feb9bacc10 2793
<> 140:97feb9bacc10 2794 /**
<> 140:97feb9bacc10 2795 * @brief Dot product of Q31 vectors.
<> 140:97feb9bacc10 2796 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 2797 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 2798 * @param[in] blockSize number of samples in each vector
<> 140:97feb9bacc10 2799 * @param[out] *result output result returned here
<> 140:97feb9bacc10 2800 * @return none.
<> 140:97feb9bacc10 2801 */
<> 140:97feb9bacc10 2802
<> 140:97feb9bacc10 2803 void arm_dot_prod_q31(
<> 140:97feb9bacc10 2804 q31_t * pSrcA,
<> 140:97feb9bacc10 2805 q31_t * pSrcB,
<> 140:97feb9bacc10 2806 uint32_t blockSize,
<> 140:97feb9bacc10 2807 q63_t * result);
<> 140:97feb9bacc10 2808
<> 140:97feb9bacc10 2809 /**
<> 140:97feb9bacc10 2810 * @brief Shifts the elements of a Q7 vector a specified number of bits.
<> 140:97feb9bacc10 2811 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2812 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 140:97feb9bacc10 2813 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2814 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2815 * @return none.
<> 140:97feb9bacc10 2816 */
<> 140:97feb9bacc10 2817
<> 140:97feb9bacc10 2818 void arm_shift_q7(
<> 140:97feb9bacc10 2819 q7_t * pSrc,
<> 140:97feb9bacc10 2820 int8_t shiftBits,
<> 140:97feb9bacc10 2821 q7_t * pDst,
<> 140:97feb9bacc10 2822 uint32_t blockSize);
<> 140:97feb9bacc10 2823
<> 140:97feb9bacc10 2824 /**
<> 140:97feb9bacc10 2825 * @brief Shifts the elements of a Q15 vector a specified number of bits.
<> 140:97feb9bacc10 2826 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2827 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 140:97feb9bacc10 2828 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2829 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2830 * @return none.
<> 140:97feb9bacc10 2831 */
<> 140:97feb9bacc10 2832
<> 140:97feb9bacc10 2833 void arm_shift_q15(
<> 140:97feb9bacc10 2834 q15_t * pSrc,
<> 140:97feb9bacc10 2835 int8_t shiftBits,
<> 140:97feb9bacc10 2836 q15_t * pDst,
<> 140:97feb9bacc10 2837 uint32_t blockSize);
<> 140:97feb9bacc10 2838
<> 140:97feb9bacc10 2839 /**
<> 140:97feb9bacc10 2840 * @brief Shifts the elements of a Q31 vector a specified number of bits.
<> 140:97feb9bacc10 2841 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2842 * @param[in] shiftBits number of bits to shift. A positive value shifts left; a negative value shifts right.
<> 140:97feb9bacc10 2843 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2844 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2845 * @return none.
<> 140:97feb9bacc10 2846 */
<> 140:97feb9bacc10 2847
<> 140:97feb9bacc10 2848 void arm_shift_q31(
<> 140:97feb9bacc10 2849 q31_t * pSrc,
<> 140:97feb9bacc10 2850 int8_t shiftBits,
<> 140:97feb9bacc10 2851 q31_t * pDst,
<> 140:97feb9bacc10 2852 uint32_t blockSize);
<> 140:97feb9bacc10 2853
<> 140:97feb9bacc10 2854 /**
<> 140:97feb9bacc10 2855 * @brief Adds a constant offset to a floating-point vector.
<> 140:97feb9bacc10 2856 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2857 * @param[in] offset is the offset to be added
<> 140:97feb9bacc10 2858 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2859 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2860 * @return none.
<> 140:97feb9bacc10 2861 */
<> 140:97feb9bacc10 2862
<> 140:97feb9bacc10 2863 void arm_offset_f32(
<> 140:97feb9bacc10 2864 float32_t * pSrc,
<> 140:97feb9bacc10 2865 float32_t offset,
<> 140:97feb9bacc10 2866 float32_t * pDst,
<> 140:97feb9bacc10 2867 uint32_t blockSize);
<> 140:97feb9bacc10 2868
<> 140:97feb9bacc10 2869 /**
<> 140:97feb9bacc10 2870 * @brief Adds a constant offset to a Q7 vector.
<> 140:97feb9bacc10 2871 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2872 * @param[in] offset is the offset to be added
<> 140:97feb9bacc10 2873 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2874 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2875 * @return none.
<> 140:97feb9bacc10 2876 */
<> 140:97feb9bacc10 2877
<> 140:97feb9bacc10 2878 void arm_offset_q7(
<> 140:97feb9bacc10 2879 q7_t * pSrc,
<> 140:97feb9bacc10 2880 q7_t offset,
<> 140:97feb9bacc10 2881 q7_t * pDst,
<> 140:97feb9bacc10 2882 uint32_t blockSize);
<> 140:97feb9bacc10 2883
<> 140:97feb9bacc10 2884 /**
<> 140:97feb9bacc10 2885 * @brief Adds a constant offset to a Q15 vector.
<> 140:97feb9bacc10 2886 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2887 * @param[in] offset is the offset to be added
<> 140:97feb9bacc10 2888 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2889 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2890 * @return none.
<> 140:97feb9bacc10 2891 */
<> 140:97feb9bacc10 2892
<> 140:97feb9bacc10 2893 void arm_offset_q15(
<> 140:97feb9bacc10 2894 q15_t * pSrc,
<> 140:97feb9bacc10 2895 q15_t offset,
<> 140:97feb9bacc10 2896 q15_t * pDst,
<> 140:97feb9bacc10 2897 uint32_t blockSize);
<> 140:97feb9bacc10 2898
<> 140:97feb9bacc10 2899 /**
<> 140:97feb9bacc10 2900 * @brief Adds a constant offset to a Q31 vector.
<> 140:97feb9bacc10 2901 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2902 * @param[in] offset is the offset to be added
<> 140:97feb9bacc10 2903 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2904 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2905 * @return none.
<> 140:97feb9bacc10 2906 */
<> 140:97feb9bacc10 2907
<> 140:97feb9bacc10 2908 void arm_offset_q31(
<> 140:97feb9bacc10 2909 q31_t * pSrc,
<> 140:97feb9bacc10 2910 q31_t offset,
<> 140:97feb9bacc10 2911 q31_t * pDst,
<> 140:97feb9bacc10 2912 uint32_t blockSize);
<> 140:97feb9bacc10 2913
<> 140:97feb9bacc10 2914 /**
<> 140:97feb9bacc10 2915 * @brief Negates the elements of a floating-point vector.
<> 140:97feb9bacc10 2916 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2917 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2918 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2919 * @return none.
<> 140:97feb9bacc10 2920 */
<> 140:97feb9bacc10 2921
<> 140:97feb9bacc10 2922 void arm_negate_f32(
<> 140:97feb9bacc10 2923 float32_t * pSrc,
<> 140:97feb9bacc10 2924 float32_t * pDst,
<> 140:97feb9bacc10 2925 uint32_t blockSize);
<> 140:97feb9bacc10 2926
<> 140:97feb9bacc10 2927 /**
<> 140:97feb9bacc10 2928 * @brief Negates the elements of a Q7 vector.
<> 140:97feb9bacc10 2929 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2930 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2931 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2932 * @return none.
<> 140:97feb9bacc10 2933 */
<> 140:97feb9bacc10 2934
<> 140:97feb9bacc10 2935 void arm_negate_q7(
<> 140:97feb9bacc10 2936 q7_t * pSrc,
<> 140:97feb9bacc10 2937 q7_t * pDst,
<> 140:97feb9bacc10 2938 uint32_t blockSize);
<> 140:97feb9bacc10 2939
<> 140:97feb9bacc10 2940 /**
<> 140:97feb9bacc10 2941 * @brief Negates the elements of a Q15 vector.
<> 140:97feb9bacc10 2942 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2943 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2944 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2945 * @return none.
<> 140:97feb9bacc10 2946 */
<> 140:97feb9bacc10 2947
<> 140:97feb9bacc10 2948 void arm_negate_q15(
<> 140:97feb9bacc10 2949 q15_t * pSrc,
<> 140:97feb9bacc10 2950 q15_t * pDst,
<> 140:97feb9bacc10 2951 uint32_t blockSize);
<> 140:97feb9bacc10 2952
<> 140:97feb9bacc10 2953 /**
<> 140:97feb9bacc10 2954 * @brief Negates the elements of a Q31 vector.
<> 140:97feb9bacc10 2955 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 2956 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 2957 * @param[in] blockSize number of samples in the vector
<> 140:97feb9bacc10 2958 * @return none.
<> 140:97feb9bacc10 2959 */
<> 140:97feb9bacc10 2960
<> 140:97feb9bacc10 2961 void arm_negate_q31(
<> 140:97feb9bacc10 2962 q31_t * pSrc,
<> 140:97feb9bacc10 2963 q31_t * pDst,
<> 140:97feb9bacc10 2964 uint32_t blockSize);
<> 140:97feb9bacc10 2965 /**
<> 140:97feb9bacc10 2966 * @brief Copies the elements of a floating-point vector.
<> 140:97feb9bacc10 2967 * @param[in] *pSrc input pointer
<> 140:97feb9bacc10 2968 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 2969 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 2970 * @return none.
<> 140:97feb9bacc10 2971 */
<> 140:97feb9bacc10 2972 void arm_copy_f32(
<> 140:97feb9bacc10 2973 float32_t * pSrc,
<> 140:97feb9bacc10 2974 float32_t * pDst,
<> 140:97feb9bacc10 2975 uint32_t blockSize);
<> 140:97feb9bacc10 2976
<> 140:97feb9bacc10 2977 /**
<> 140:97feb9bacc10 2978 * @brief Copies the elements of a Q7 vector.
<> 140:97feb9bacc10 2979 * @param[in] *pSrc input pointer
<> 140:97feb9bacc10 2980 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 2981 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 2982 * @return none.
<> 140:97feb9bacc10 2983 */
<> 140:97feb9bacc10 2984 void arm_copy_q7(
<> 140:97feb9bacc10 2985 q7_t * pSrc,
<> 140:97feb9bacc10 2986 q7_t * pDst,
<> 140:97feb9bacc10 2987 uint32_t blockSize);
<> 140:97feb9bacc10 2988
<> 140:97feb9bacc10 2989 /**
<> 140:97feb9bacc10 2990 * @brief Copies the elements of a Q15 vector.
<> 140:97feb9bacc10 2991 * @param[in] *pSrc input pointer
<> 140:97feb9bacc10 2992 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 2993 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 2994 * @return none.
<> 140:97feb9bacc10 2995 */
<> 140:97feb9bacc10 2996 void arm_copy_q15(
<> 140:97feb9bacc10 2997 q15_t * pSrc,
<> 140:97feb9bacc10 2998 q15_t * pDst,
<> 140:97feb9bacc10 2999 uint32_t blockSize);
<> 140:97feb9bacc10 3000
<> 140:97feb9bacc10 3001 /**
<> 140:97feb9bacc10 3002 * @brief Copies the elements of a Q31 vector.
<> 140:97feb9bacc10 3003 * @param[in] *pSrc input pointer
<> 140:97feb9bacc10 3004 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 3005 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 3006 * @return none.
<> 140:97feb9bacc10 3007 */
<> 140:97feb9bacc10 3008 void arm_copy_q31(
<> 140:97feb9bacc10 3009 q31_t * pSrc,
<> 140:97feb9bacc10 3010 q31_t * pDst,
<> 140:97feb9bacc10 3011 uint32_t blockSize);
<> 140:97feb9bacc10 3012 /**
<> 140:97feb9bacc10 3013 * @brief Fills a constant value into a floating-point vector.
<> 140:97feb9bacc10 3014 * @param[in] value input value to be filled
<> 140:97feb9bacc10 3015 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 3016 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 3017 * @return none.
<> 140:97feb9bacc10 3018 */
<> 140:97feb9bacc10 3019 void arm_fill_f32(
<> 140:97feb9bacc10 3020 float32_t value,
<> 140:97feb9bacc10 3021 float32_t * pDst,
<> 140:97feb9bacc10 3022 uint32_t blockSize);
<> 140:97feb9bacc10 3023
<> 140:97feb9bacc10 3024 /**
<> 140:97feb9bacc10 3025 * @brief Fills a constant value into a Q7 vector.
<> 140:97feb9bacc10 3026 * @param[in] value input value to be filled
<> 140:97feb9bacc10 3027 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 3028 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 3029 * @return none.
<> 140:97feb9bacc10 3030 */
<> 140:97feb9bacc10 3031 void arm_fill_q7(
<> 140:97feb9bacc10 3032 q7_t value,
<> 140:97feb9bacc10 3033 q7_t * pDst,
<> 140:97feb9bacc10 3034 uint32_t blockSize);
<> 140:97feb9bacc10 3035
<> 140:97feb9bacc10 3036 /**
<> 140:97feb9bacc10 3037 * @brief Fills a constant value into a Q15 vector.
<> 140:97feb9bacc10 3038 * @param[in] value input value to be filled
<> 140:97feb9bacc10 3039 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 3040 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 3041 * @return none.
<> 140:97feb9bacc10 3042 */
<> 140:97feb9bacc10 3043 void arm_fill_q15(
<> 140:97feb9bacc10 3044 q15_t value,
<> 140:97feb9bacc10 3045 q15_t * pDst,
<> 140:97feb9bacc10 3046 uint32_t blockSize);
<> 140:97feb9bacc10 3047
<> 140:97feb9bacc10 3048 /**
<> 140:97feb9bacc10 3049 * @brief Fills a constant value into a Q31 vector.
<> 140:97feb9bacc10 3050 * @param[in] value input value to be filled
<> 140:97feb9bacc10 3051 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 3052 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 3053 * @return none.
<> 140:97feb9bacc10 3054 */
<> 140:97feb9bacc10 3055 void arm_fill_q31(
<> 140:97feb9bacc10 3056 q31_t value,
<> 140:97feb9bacc10 3057 q31_t * pDst,
<> 140:97feb9bacc10 3058 uint32_t blockSize);
<> 140:97feb9bacc10 3059
<> 140:97feb9bacc10 3060 /**
<> 140:97feb9bacc10 3061 * @brief Convolution of floating-point sequences.
<> 140:97feb9bacc10 3062 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3063 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3064 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3065 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3066 * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3067 * @return none.
<> 140:97feb9bacc10 3068 */
<> 140:97feb9bacc10 3069
<> 140:97feb9bacc10 3070 void arm_conv_f32(
<> 140:97feb9bacc10 3071 float32_t * pSrcA,
<> 140:97feb9bacc10 3072 uint32_t srcALen,
<> 140:97feb9bacc10 3073 float32_t * pSrcB,
<> 140:97feb9bacc10 3074 uint32_t srcBLen,
<> 140:97feb9bacc10 3075 float32_t * pDst);
<> 140:97feb9bacc10 3076
<> 140:97feb9bacc10 3077
<> 140:97feb9bacc10 3078 /**
<> 140:97feb9bacc10 3079 * @brief Convolution of Q15 sequences.
<> 140:97feb9bacc10 3080 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3081 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3082 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3083 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3084 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3085 * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 3086 * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 140:97feb9bacc10 3087 * @return none.
<> 140:97feb9bacc10 3088 */
<> 140:97feb9bacc10 3089
<> 140:97feb9bacc10 3090
<> 140:97feb9bacc10 3091 void arm_conv_opt_q15(
<> 140:97feb9bacc10 3092 q15_t * pSrcA,
<> 140:97feb9bacc10 3093 uint32_t srcALen,
<> 140:97feb9bacc10 3094 q15_t * pSrcB,
<> 140:97feb9bacc10 3095 uint32_t srcBLen,
<> 140:97feb9bacc10 3096 q15_t * pDst,
<> 140:97feb9bacc10 3097 q15_t * pScratch1,
<> 140:97feb9bacc10 3098 q15_t * pScratch2);
<> 140:97feb9bacc10 3099
<> 140:97feb9bacc10 3100
<> 140:97feb9bacc10 3101 /**
<> 140:97feb9bacc10 3102 * @brief Convolution of Q15 sequences.
<> 140:97feb9bacc10 3103 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3104 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3105 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3106 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3107 * @param[out] *pDst points to the location where the output result is written. Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3108 * @return none.
<> 140:97feb9bacc10 3109 */
<> 140:97feb9bacc10 3110
<> 140:97feb9bacc10 3111 void arm_conv_q15(
<> 140:97feb9bacc10 3112 q15_t * pSrcA,
<> 140:97feb9bacc10 3113 uint32_t srcALen,
<> 140:97feb9bacc10 3114 q15_t * pSrcB,
<> 140:97feb9bacc10 3115 uint32_t srcBLen,
<> 140:97feb9bacc10 3116 q15_t * pDst);
<> 140:97feb9bacc10 3117
<> 140:97feb9bacc10 3118 /**
<> 140:97feb9bacc10 3119 * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 3120 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3121 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3122 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3123 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3124 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3125 * @return none.
<> 140:97feb9bacc10 3126 */
<> 140:97feb9bacc10 3127
<> 140:97feb9bacc10 3128 void arm_conv_fast_q15(
<> 140:97feb9bacc10 3129 q15_t * pSrcA,
<> 140:97feb9bacc10 3130 uint32_t srcALen,
<> 140:97feb9bacc10 3131 q15_t * pSrcB,
<> 140:97feb9bacc10 3132 uint32_t srcBLen,
<> 140:97feb9bacc10 3133 q15_t * pDst);
<> 140:97feb9bacc10 3134
<> 140:97feb9bacc10 3135 /**
<> 140:97feb9bacc10 3136 * @brief Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 3137 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3138 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3139 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3140 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3141 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3142 * @param[in] *pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 3143 * @param[in] *pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 140:97feb9bacc10 3144 * @return none.
<> 140:97feb9bacc10 3145 */
<> 140:97feb9bacc10 3146
<> 140:97feb9bacc10 3147 void arm_conv_fast_opt_q15(
<> 140:97feb9bacc10 3148 q15_t * pSrcA,
<> 140:97feb9bacc10 3149 uint32_t srcALen,
<> 140:97feb9bacc10 3150 q15_t * pSrcB,
<> 140:97feb9bacc10 3151 uint32_t srcBLen,
<> 140:97feb9bacc10 3152 q15_t * pDst,
<> 140:97feb9bacc10 3153 q15_t * pScratch1,
<> 140:97feb9bacc10 3154 q15_t * pScratch2);
<> 140:97feb9bacc10 3155
<> 140:97feb9bacc10 3156
<> 140:97feb9bacc10 3157
<> 140:97feb9bacc10 3158 /**
<> 140:97feb9bacc10 3159 * @brief Convolution of Q31 sequences.
<> 140:97feb9bacc10 3160 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3161 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3162 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3163 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3164 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3165 * @return none.
<> 140:97feb9bacc10 3166 */
<> 140:97feb9bacc10 3167
<> 140:97feb9bacc10 3168 void arm_conv_q31(
<> 140:97feb9bacc10 3169 q31_t * pSrcA,
<> 140:97feb9bacc10 3170 uint32_t srcALen,
<> 140:97feb9bacc10 3171 q31_t * pSrcB,
<> 140:97feb9bacc10 3172 uint32_t srcBLen,
<> 140:97feb9bacc10 3173 q31_t * pDst);
<> 140:97feb9bacc10 3174
<> 140:97feb9bacc10 3175 /**
<> 140:97feb9bacc10 3176 * @brief Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 3177 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3178 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3179 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3180 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3181 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3182 * @return none.
<> 140:97feb9bacc10 3183 */
<> 140:97feb9bacc10 3184
<> 140:97feb9bacc10 3185 void arm_conv_fast_q31(
<> 140:97feb9bacc10 3186 q31_t * pSrcA,
<> 140:97feb9bacc10 3187 uint32_t srcALen,
<> 140:97feb9bacc10 3188 q31_t * pSrcB,
<> 140:97feb9bacc10 3189 uint32_t srcBLen,
<> 140:97feb9bacc10 3190 q31_t * pDst);
<> 140:97feb9bacc10 3191
<> 140:97feb9bacc10 3192
<> 140:97feb9bacc10 3193 /**
<> 140:97feb9bacc10 3194 * @brief Convolution of Q7 sequences.
<> 140:97feb9bacc10 3195 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3196 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3197 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3198 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3199 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3200 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 3201 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 140:97feb9bacc10 3202 * @return none.
<> 140:97feb9bacc10 3203 */
<> 140:97feb9bacc10 3204
<> 140:97feb9bacc10 3205 void arm_conv_opt_q7(
<> 140:97feb9bacc10 3206 q7_t * pSrcA,
<> 140:97feb9bacc10 3207 uint32_t srcALen,
<> 140:97feb9bacc10 3208 q7_t * pSrcB,
<> 140:97feb9bacc10 3209 uint32_t srcBLen,
<> 140:97feb9bacc10 3210 q7_t * pDst,
<> 140:97feb9bacc10 3211 q15_t * pScratch1,
<> 140:97feb9bacc10 3212 q15_t * pScratch2);
<> 140:97feb9bacc10 3213
<> 140:97feb9bacc10 3214
<> 140:97feb9bacc10 3215
<> 140:97feb9bacc10 3216 /**
<> 140:97feb9bacc10 3217 * @brief Convolution of Q7 sequences.
<> 140:97feb9bacc10 3218 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3219 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3220 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3221 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3222 * @param[out] *pDst points to the block of output data Length srcALen+srcBLen-1.
<> 140:97feb9bacc10 3223 * @return none.
<> 140:97feb9bacc10 3224 */
<> 140:97feb9bacc10 3225
<> 140:97feb9bacc10 3226 void arm_conv_q7(
<> 140:97feb9bacc10 3227 q7_t * pSrcA,
<> 140:97feb9bacc10 3228 uint32_t srcALen,
<> 140:97feb9bacc10 3229 q7_t * pSrcB,
<> 140:97feb9bacc10 3230 uint32_t srcBLen,
<> 140:97feb9bacc10 3231 q7_t * pDst);
<> 140:97feb9bacc10 3232
<> 140:97feb9bacc10 3233
<> 140:97feb9bacc10 3234 /**
<> 140:97feb9bacc10 3235 * @brief Partial convolution of floating-point sequences.
<> 140:97feb9bacc10 3236 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3237 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3238 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3239 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3240 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3241 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3242 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3243 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3244 */
<> 140:97feb9bacc10 3245
<> 140:97feb9bacc10 3246 arm_status arm_conv_partial_f32(
<> 140:97feb9bacc10 3247 float32_t * pSrcA,
<> 140:97feb9bacc10 3248 uint32_t srcALen,
<> 140:97feb9bacc10 3249 float32_t * pSrcB,
<> 140:97feb9bacc10 3250 uint32_t srcBLen,
<> 140:97feb9bacc10 3251 float32_t * pDst,
<> 140:97feb9bacc10 3252 uint32_t firstIndex,
<> 140:97feb9bacc10 3253 uint32_t numPoints);
<> 140:97feb9bacc10 3254
<> 140:97feb9bacc10 3255 /**
<> 140:97feb9bacc10 3256 * @brief Partial convolution of Q15 sequences.
<> 140:97feb9bacc10 3257 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3258 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3259 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3260 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3261 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3262 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3263 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3264 * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 3265 * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 140:97feb9bacc10 3266 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3267 */
<> 140:97feb9bacc10 3268
<> 140:97feb9bacc10 3269 arm_status arm_conv_partial_opt_q15(
<> 140:97feb9bacc10 3270 q15_t * pSrcA,
<> 140:97feb9bacc10 3271 uint32_t srcALen,
<> 140:97feb9bacc10 3272 q15_t * pSrcB,
<> 140:97feb9bacc10 3273 uint32_t srcBLen,
<> 140:97feb9bacc10 3274 q15_t * pDst,
<> 140:97feb9bacc10 3275 uint32_t firstIndex,
<> 140:97feb9bacc10 3276 uint32_t numPoints,
<> 140:97feb9bacc10 3277 q15_t * pScratch1,
<> 140:97feb9bacc10 3278 q15_t * pScratch2);
<> 140:97feb9bacc10 3279
<> 140:97feb9bacc10 3280
<> 140:97feb9bacc10 3281 /**
<> 140:97feb9bacc10 3282 * @brief Partial convolution of Q15 sequences.
<> 140:97feb9bacc10 3283 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3284 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3285 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3286 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3287 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3288 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3289 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3290 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3291 */
<> 140:97feb9bacc10 3292
<> 140:97feb9bacc10 3293 arm_status arm_conv_partial_q15(
<> 140:97feb9bacc10 3294 q15_t * pSrcA,
<> 140:97feb9bacc10 3295 uint32_t srcALen,
<> 140:97feb9bacc10 3296 q15_t * pSrcB,
<> 140:97feb9bacc10 3297 uint32_t srcBLen,
<> 140:97feb9bacc10 3298 q15_t * pDst,
<> 140:97feb9bacc10 3299 uint32_t firstIndex,
<> 140:97feb9bacc10 3300 uint32_t numPoints);
<> 140:97feb9bacc10 3301
<> 140:97feb9bacc10 3302 /**
<> 140:97feb9bacc10 3303 * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 3304 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3305 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3306 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3307 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3308 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3309 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3310 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3311 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3312 */
<> 140:97feb9bacc10 3313
<> 140:97feb9bacc10 3314 arm_status arm_conv_partial_fast_q15(
<> 140:97feb9bacc10 3315 q15_t * pSrcA,
<> 140:97feb9bacc10 3316 uint32_t srcALen,
<> 140:97feb9bacc10 3317 q15_t * pSrcB,
<> 140:97feb9bacc10 3318 uint32_t srcBLen,
<> 140:97feb9bacc10 3319 q15_t * pDst,
<> 140:97feb9bacc10 3320 uint32_t firstIndex,
<> 140:97feb9bacc10 3321 uint32_t numPoints);
<> 140:97feb9bacc10 3322
<> 140:97feb9bacc10 3323
<> 140:97feb9bacc10 3324 /**
<> 140:97feb9bacc10 3325 * @brief Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 3326 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3327 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3328 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3329 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3330 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3331 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3332 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3333 * @param[in] * pScratch1 points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 3334 * @param[in] * pScratch2 points to scratch buffer of size min(srcALen, srcBLen).
<> 140:97feb9bacc10 3335 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3336 */
<> 140:97feb9bacc10 3337
<> 140:97feb9bacc10 3338 arm_status arm_conv_partial_fast_opt_q15(
<> 140:97feb9bacc10 3339 q15_t * pSrcA,
<> 140:97feb9bacc10 3340 uint32_t srcALen,
<> 140:97feb9bacc10 3341 q15_t * pSrcB,
<> 140:97feb9bacc10 3342 uint32_t srcBLen,
<> 140:97feb9bacc10 3343 q15_t * pDst,
<> 140:97feb9bacc10 3344 uint32_t firstIndex,
<> 140:97feb9bacc10 3345 uint32_t numPoints,
<> 140:97feb9bacc10 3346 q15_t * pScratch1,
<> 140:97feb9bacc10 3347 q15_t * pScratch2);
<> 140:97feb9bacc10 3348
<> 140:97feb9bacc10 3349
<> 140:97feb9bacc10 3350 /**
<> 140:97feb9bacc10 3351 * @brief Partial convolution of Q31 sequences.
<> 140:97feb9bacc10 3352 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3353 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3354 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3355 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3356 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3357 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3358 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3359 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3360 */
<> 140:97feb9bacc10 3361
<> 140:97feb9bacc10 3362 arm_status arm_conv_partial_q31(
<> 140:97feb9bacc10 3363 q31_t * pSrcA,
<> 140:97feb9bacc10 3364 uint32_t srcALen,
<> 140:97feb9bacc10 3365 q31_t * pSrcB,
<> 140:97feb9bacc10 3366 uint32_t srcBLen,
<> 140:97feb9bacc10 3367 q31_t * pDst,
<> 140:97feb9bacc10 3368 uint32_t firstIndex,
<> 140:97feb9bacc10 3369 uint32_t numPoints);
<> 140:97feb9bacc10 3370
<> 140:97feb9bacc10 3371
<> 140:97feb9bacc10 3372 /**
<> 140:97feb9bacc10 3373 * @brief Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 3374 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3375 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3376 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3377 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3378 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3379 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3380 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3381 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3382 */
<> 140:97feb9bacc10 3383
<> 140:97feb9bacc10 3384 arm_status arm_conv_partial_fast_q31(
<> 140:97feb9bacc10 3385 q31_t * pSrcA,
<> 140:97feb9bacc10 3386 uint32_t srcALen,
<> 140:97feb9bacc10 3387 q31_t * pSrcB,
<> 140:97feb9bacc10 3388 uint32_t srcBLen,
<> 140:97feb9bacc10 3389 q31_t * pDst,
<> 140:97feb9bacc10 3390 uint32_t firstIndex,
<> 140:97feb9bacc10 3391 uint32_t numPoints);
<> 140:97feb9bacc10 3392
<> 140:97feb9bacc10 3393
<> 140:97feb9bacc10 3394 /**
<> 140:97feb9bacc10 3395 * @brief Partial convolution of Q7 sequences
<> 140:97feb9bacc10 3396 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3397 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3398 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3399 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3400 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3401 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3402 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3403 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 3404 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 140:97feb9bacc10 3405 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3406 */
<> 140:97feb9bacc10 3407
<> 140:97feb9bacc10 3408 arm_status arm_conv_partial_opt_q7(
<> 140:97feb9bacc10 3409 q7_t * pSrcA,
<> 140:97feb9bacc10 3410 uint32_t srcALen,
<> 140:97feb9bacc10 3411 q7_t * pSrcB,
<> 140:97feb9bacc10 3412 uint32_t srcBLen,
<> 140:97feb9bacc10 3413 q7_t * pDst,
<> 140:97feb9bacc10 3414 uint32_t firstIndex,
<> 140:97feb9bacc10 3415 uint32_t numPoints,
<> 140:97feb9bacc10 3416 q15_t * pScratch1,
<> 140:97feb9bacc10 3417 q15_t * pScratch2);
<> 140:97feb9bacc10 3418
<> 140:97feb9bacc10 3419
<> 140:97feb9bacc10 3420 /**
<> 140:97feb9bacc10 3421 * @brief Partial convolution of Q7 sequences.
<> 140:97feb9bacc10 3422 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 3423 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 3424 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 3425 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 3426 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3427 * @param[in] firstIndex is the first output sample to start with.
<> 140:97feb9bacc10 3428 * @param[in] numPoints is the number of output points to be computed.
<> 140:97feb9bacc10 3429 * @return Returns either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the requested subset is not in the range [0 srcALen+srcBLen-2].
<> 140:97feb9bacc10 3430 */
<> 140:97feb9bacc10 3431
<> 140:97feb9bacc10 3432 arm_status arm_conv_partial_q7(
<> 140:97feb9bacc10 3433 q7_t * pSrcA,
<> 140:97feb9bacc10 3434 uint32_t srcALen,
<> 140:97feb9bacc10 3435 q7_t * pSrcB,
<> 140:97feb9bacc10 3436 uint32_t srcBLen,
<> 140:97feb9bacc10 3437 q7_t * pDst,
<> 140:97feb9bacc10 3438 uint32_t firstIndex,
<> 140:97feb9bacc10 3439 uint32_t numPoints);
<> 140:97feb9bacc10 3440
<> 140:97feb9bacc10 3441
<> 140:97feb9bacc10 3442
<> 140:97feb9bacc10 3443 /**
<> 140:97feb9bacc10 3444 * @brief Instance structure for the Q15 FIR decimator.
<> 140:97feb9bacc10 3445 */
<> 140:97feb9bacc10 3446
<> 140:97feb9bacc10 3447 typedef struct
<> 140:97feb9bacc10 3448 {
<> 140:97feb9bacc10 3449 uint8_t M; /**< decimation factor. */
<> 140:97feb9bacc10 3450 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 3451 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 3452 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 3453 } arm_fir_decimate_instance_q15;
<> 140:97feb9bacc10 3454
<> 140:97feb9bacc10 3455 /**
<> 140:97feb9bacc10 3456 * @brief Instance structure for the Q31 FIR decimator.
<> 140:97feb9bacc10 3457 */
<> 140:97feb9bacc10 3458
<> 140:97feb9bacc10 3459 typedef struct
<> 140:97feb9bacc10 3460 {
<> 140:97feb9bacc10 3461 uint8_t M; /**< decimation factor. */
<> 140:97feb9bacc10 3462 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 3463 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 3464 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 3465
<> 140:97feb9bacc10 3466 } arm_fir_decimate_instance_q31;
<> 140:97feb9bacc10 3467
<> 140:97feb9bacc10 3468 /**
<> 140:97feb9bacc10 3469 * @brief Instance structure for the floating-point FIR decimator.
<> 140:97feb9bacc10 3470 */
<> 140:97feb9bacc10 3471
<> 140:97feb9bacc10 3472 typedef struct
<> 140:97feb9bacc10 3473 {
<> 140:97feb9bacc10 3474 uint8_t M; /**< decimation factor. */
<> 140:97feb9bacc10 3475 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 3476 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 3477 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 3478
<> 140:97feb9bacc10 3479 } arm_fir_decimate_instance_f32;
<> 140:97feb9bacc10 3480
<> 140:97feb9bacc10 3481
<> 140:97feb9bacc10 3482
<> 140:97feb9bacc10 3483 /**
<> 140:97feb9bacc10 3484 * @brief Processing function for the floating-point FIR decimator.
<> 140:97feb9bacc10 3485 * @param[in] *S points to an instance of the floating-point FIR decimator structure.
<> 140:97feb9bacc10 3486 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3487 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3488 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3489 * @return none
<> 140:97feb9bacc10 3490 */
<> 140:97feb9bacc10 3491
<> 140:97feb9bacc10 3492 void arm_fir_decimate_f32(
<> 140:97feb9bacc10 3493 const arm_fir_decimate_instance_f32 * S,
<> 140:97feb9bacc10 3494 float32_t * pSrc,
<> 140:97feb9bacc10 3495 float32_t * pDst,
<> 140:97feb9bacc10 3496 uint32_t blockSize);
<> 140:97feb9bacc10 3497
<> 140:97feb9bacc10 3498
<> 140:97feb9bacc10 3499 /**
<> 140:97feb9bacc10 3500 * @brief Initialization function for the floating-point FIR decimator.
<> 140:97feb9bacc10 3501 * @param[in,out] *S points to an instance of the floating-point FIR decimator structure.
<> 140:97feb9bacc10 3502 * @param[in] numTaps number of coefficients in the filter.
<> 140:97feb9bacc10 3503 * @param[in] M decimation factor.
<> 140:97feb9bacc10 3504 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 3505 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3506 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3507 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 140:97feb9bacc10 3508 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 140:97feb9bacc10 3509 */
<> 140:97feb9bacc10 3510
<> 140:97feb9bacc10 3511 arm_status arm_fir_decimate_init_f32(
<> 140:97feb9bacc10 3512 arm_fir_decimate_instance_f32 * S,
<> 140:97feb9bacc10 3513 uint16_t numTaps,
<> 140:97feb9bacc10 3514 uint8_t M,
<> 140:97feb9bacc10 3515 float32_t * pCoeffs,
<> 140:97feb9bacc10 3516 float32_t * pState,
<> 140:97feb9bacc10 3517 uint32_t blockSize);
<> 140:97feb9bacc10 3518
<> 140:97feb9bacc10 3519 /**
<> 140:97feb9bacc10 3520 * @brief Processing function for the Q15 FIR decimator.
<> 140:97feb9bacc10 3521 * @param[in] *S points to an instance of the Q15 FIR decimator structure.
<> 140:97feb9bacc10 3522 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3523 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3524 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3525 * @return none
<> 140:97feb9bacc10 3526 */
<> 140:97feb9bacc10 3527
<> 140:97feb9bacc10 3528 void arm_fir_decimate_q15(
<> 140:97feb9bacc10 3529 const arm_fir_decimate_instance_q15 * S,
<> 140:97feb9bacc10 3530 q15_t * pSrc,
<> 140:97feb9bacc10 3531 q15_t * pDst,
<> 140:97feb9bacc10 3532 uint32_t blockSize);
<> 140:97feb9bacc10 3533
<> 140:97feb9bacc10 3534 /**
<> 140:97feb9bacc10 3535 * @brief Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
<> 140:97feb9bacc10 3536 * @param[in] *S points to an instance of the Q15 FIR decimator structure.
<> 140:97feb9bacc10 3537 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3538 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3539 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3540 * @return none
<> 140:97feb9bacc10 3541 */
<> 140:97feb9bacc10 3542
<> 140:97feb9bacc10 3543 void arm_fir_decimate_fast_q15(
<> 140:97feb9bacc10 3544 const arm_fir_decimate_instance_q15 * S,
<> 140:97feb9bacc10 3545 q15_t * pSrc,
<> 140:97feb9bacc10 3546 q15_t * pDst,
<> 140:97feb9bacc10 3547 uint32_t blockSize);
<> 140:97feb9bacc10 3548
<> 140:97feb9bacc10 3549
<> 140:97feb9bacc10 3550
<> 140:97feb9bacc10 3551 /**
<> 140:97feb9bacc10 3552 * @brief Initialization function for the Q15 FIR decimator.
<> 140:97feb9bacc10 3553 * @param[in,out] *S points to an instance of the Q15 FIR decimator structure.
<> 140:97feb9bacc10 3554 * @param[in] numTaps number of coefficients in the filter.
<> 140:97feb9bacc10 3555 * @param[in] M decimation factor.
<> 140:97feb9bacc10 3556 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 3557 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3558 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3559 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 140:97feb9bacc10 3560 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 140:97feb9bacc10 3561 */
<> 140:97feb9bacc10 3562
<> 140:97feb9bacc10 3563 arm_status arm_fir_decimate_init_q15(
<> 140:97feb9bacc10 3564 arm_fir_decimate_instance_q15 * S,
<> 140:97feb9bacc10 3565 uint16_t numTaps,
<> 140:97feb9bacc10 3566 uint8_t M,
<> 140:97feb9bacc10 3567 q15_t * pCoeffs,
<> 140:97feb9bacc10 3568 q15_t * pState,
<> 140:97feb9bacc10 3569 uint32_t blockSize);
<> 140:97feb9bacc10 3570
<> 140:97feb9bacc10 3571 /**
<> 140:97feb9bacc10 3572 * @brief Processing function for the Q31 FIR decimator.
<> 140:97feb9bacc10 3573 * @param[in] *S points to an instance of the Q31 FIR decimator structure.
<> 140:97feb9bacc10 3574 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3575 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3576 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3577 * @return none
<> 140:97feb9bacc10 3578 */
<> 140:97feb9bacc10 3579
<> 140:97feb9bacc10 3580 void arm_fir_decimate_q31(
<> 140:97feb9bacc10 3581 const arm_fir_decimate_instance_q31 * S,
<> 140:97feb9bacc10 3582 q31_t * pSrc,
<> 140:97feb9bacc10 3583 q31_t * pDst,
<> 140:97feb9bacc10 3584 uint32_t blockSize);
<> 140:97feb9bacc10 3585
<> 140:97feb9bacc10 3586 /**
<> 140:97feb9bacc10 3587 * @brief Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
<> 140:97feb9bacc10 3588 * @param[in] *S points to an instance of the Q31 FIR decimator structure.
<> 140:97feb9bacc10 3589 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3590 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3591 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3592 * @return none
<> 140:97feb9bacc10 3593 */
<> 140:97feb9bacc10 3594
<> 140:97feb9bacc10 3595 void arm_fir_decimate_fast_q31(
<> 140:97feb9bacc10 3596 arm_fir_decimate_instance_q31 * S,
<> 140:97feb9bacc10 3597 q31_t * pSrc,
<> 140:97feb9bacc10 3598 q31_t * pDst,
<> 140:97feb9bacc10 3599 uint32_t blockSize);
<> 140:97feb9bacc10 3600
<> 140:97feb9bacc10 3601
<> 140:97feb9bacc10 3602 /**
<> 140:97feb9bacc10 3603 * @brief Initialization function for the Q31 FIR decimator.
<> 140:97feb9bacc10 3604 * @param[in,out] *S points to an instance of the Q31 FIR decimator structure.
<> 140:97feb9bacc10 3605 * @param[in] numTaps number of coefficients in the filter.
<> 140:97feb9bacc10 3606 * @param[in] M decimation factor.
<> 140:97feb9bacc10 3607 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 3608 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3609 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3610 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 140:97feb9bacc10 3611 * <code>blockSize</code> is not a multiple of <code>M</code>.
<> 140:97feb9bacc10 3612 */
<> 140:97feb9bacc10 3613
<> 140:97feb9bacc10 3614 arm_status arm_fir_decimate_init_q31(
<> 140:97feb9bacc10 3615 arm_fir_decimate_instance_q31 * S,
<> 140:97feb9bacc10 3616 uint16_t numTaps,
<> 140:97feb9bacc10 3617 uint8_t M,
<> 140:97feb9bacc10 3618 q31_t * pCoeffs,
<> 140:97feb9bacc10 3619 q31_t * pState,
<> 140:97feb9bacc10 3620 uint32_t blockSize);
<> 140:97feb9bacc10 3621
<> 140:97feb9bacc10 3622
<> 140:97feb9bacc10 3623
<> 140:97feb9bacc10 3624 /**
<> 140:97feb9bacc10 3625 * @brief Instance structure for the Q15 FIR interpolator.
<> 140:97feb9bacc10 3626 */
<> 140:97feb9bacc10 3627
<> 140:97feb9bacc10 3628 typedef struct
<> 140:97feb9bacc10 3629 {
<> 140:97feb9bacc10 3630 uint8_t L; /**< upsample factor. */
<> 140:97feb9bacc10 3631 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 140:97feb9bacc10 3632 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 140:97feb9bacc10 3633 q15_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
<> 140:97feb9bacc10 3634 } arm_fir_interpolate_instance_q15;
<> 140:97feb9bacc10 3635
<> 140:97feb9bacc10 3636 /**
<> 140:97feb9bacc10 3637 * @brief Instance structure for the Q31 FIR interpolator.
<> 140:97feb9bacc10 3638 */
<> 140:97feb9bacc10 3639
<> 140:97feb9bacc10 3640 typedef struct
<> 140:97feb9bacc10 3641 {
<> 140:97feb9bacc10 3642 uint8_t L; /**< upsample factor. */
<> 140:97feb9bacc10 3643 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 140:97feb9bacc10 3644 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 140:97feb9bacc10 3645 q31_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
<> 140:97feb9bacc10 3646 } arm_fir_interpolate_instance_q31;
<> 140:97feb9bacc10 3647
<> 140:97feb9bacc10 3648 /**
<> 140:97feb9bacc10 3649 * @brief Instance structure for the floating-point FIR interpolator.
<> 140:97feb9bacc10 3650 */
<> 140:97feb9bacc10 3651
<> 140:97feb9bacc10 3652 typedef struct
<> 140:97feb9bacc10 3653 {
<> 140:97feb9bacc10 3654 uint8_t L; /**< upsample factor. */
<> 140:97feb9bacc10 3655 uint16_t phaseLength; /**< length of each polyphase filter component. */
<> 140:97feb9bacc10 3656 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
<> 140:97feb9bacc10 3657 float32_t *pState; /**< points to the state variable array. The array is of length phaseLength+numTaps-1. */
<> 140:97feb9bacc10 3658 } arm_fir_interpolate_instance_f32;
<> 140:97feb9bacc10 3659
<> 140:97feb9bacc10 3660
<> 140:97feb9bacc10 3661 /**
<> 140:97feb9bacc10 3662 * @brief Processing function for the Q15 FIR interpolator.
<> 140:97feb9bacc10 3663 * @param[in] *S points to an instance of the Q15 FIR interpolator structure.
<> 140:97feb9bacc10 3664 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3665 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 3666 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3667 * @return none.
<> 140:97feb9bacc10 3668 */
<> 140:97feb9bacc10 3669
<> 140:97feb9bacc10 3670 void arm_fir_interpolate_q15(
<> 140:97feb9bacc10 3671 const arm_fir_interpolate_instance_q15 * S,
<> 140:97feb9bacc10 3672 q15_t * pSrc,
<> 140:97feb9bacc10 3673 q15_t * pDst,
<> 140:97feb9bacc10 3674 uint32_t blockSize);
<> 140:97feb9bacc10 3675
<> 140:97feb9bacc10 3676
<> 140:97feb9bacc10 3677 /**
<> 140:97feb9bacc10 3678 * @brief Initialization function for the Q15 FIR interpolator.
<> 140:97feb9bacc10 3679 * @param[in,out] *S points to an instance of the Q15 FIR interpolator structure.
<> 140:97feb9bacc10 3680 * @param[in] L upsample factor.
<> 140:97feb9bacc10 3681 * @param[in] numTaps number of filter coefficients in the filter.
<> 140:97feb9bacc10 3682 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 140:97feb9bacc10 3683 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3684 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3685 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 140:97feb9bacc10 3686 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 140:97feb9bacc10 3687 */
<> 140:97feb9bacc10 3688
<> 140:97feb9bacc10 3689 arm_status arm_fir_interpolate_init_q15(
<> 140:97feb9bacc10 3690 arm_fir_interpolate_instance_q15 * S,
<> 140:97feb9bacc10 3691 uint8_t L,
<> 140:97feb9bacc10 3692 uint16_t numTaps,
<> 140:97feb9bacc10 3693 q15_t * pCoeffs,
<> 140:97feb9bacc10 3694 q15_t * pState,
<> 140:97feb9bacc10 3695 uint32_t blockSize);
<> 140:97feb9bacc10 3696
<> 140:97feb9bacc10 3697 /**
<> 140:97feb9bacc10 3698 * @brief Processing function for the Q31 FIR interpolator.
<> 140:97feb9bacc10 3699 * @param[in] *S points to an instance of the Q15 FIR interpolator structure.
<> 140:97feb9bacc10 3700 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3701 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 3702 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3703 * @return none.
<> 140:97feb9bacc10 3704 */
<> 140:97feb9bacc10 3705
<> 140:97feb9bacc10 3706 void arm_fir_interpolate_q31(
<> 140:97feb9bacc10 3707 const arm_fir_interpolate_instance_q31 * S,
<> 140:97feb9bacc10 3708 q31_t * pSrc,
<> 140:97feb9bacc10 3709 q31_t * pDst,
<> 140:97feb9bacc10 3710 uint32_t blockSize);
<> 140:97feb9bacc10 3711
<> 140:97feb9bacc10 3712 /**
<> 140:97feb9bacc10 3713 * @brief Initialization function for the Q31 FIR interpolator.
<> 140:97feb9bacc10 3714 * @param[in,out] *S points to an instance of the Q31 FIR interpolator structure.
<> 140:97feb9bacc10 3715 * @param[in] L upsample factor.
<> 140:97feb9bacc10 3716 * @param[in] numTaps number of filter coefficients in the filter.
<> 140:97feb9bacc10 3717 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 140:97feb9bacc10 3718 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3719 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3720 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 140:97feb9bacc10 3721 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 140:97feb9bacc10 3722 */
<> 140:97feb9bacc10 3723
<> 140:97feb9bacc10 3724 arm_status arm_fir_interpolate_init_q31(
<> 140:97feb9bacc10 3725 arm_fir_interpolate_instance_q31 * S,
<> 140:97feb9bacc10 3726 uint8_t L,
<> 140:97feb9bacc10 3727 uint16_t numTaps,
<> 140:97feb9bacc10 3728 q31_t * pCoeffs,
<> 140:97feb9bacc10 3729 q31_t * pState,
<> 140:97feb9bacc10 3730 uint32_t blockSize);
<> 140:97feb9bacc10 3731
<> 140:97feb9bacc10 3732
<> 140:97feb9bacc10 3733 /**
<> 140:97feb9bacc10 3734 * @brief Processing function for the floating-point FIR interpolator.
<> 140:97feb9bacc10 3735 * @param[in] *S points to an instance of the floating-point FIR interpolator structure.
<> 140:97feb9bacc10 3736 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3737 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 3738 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3739 * @return none.
<> 140:97feb9bacc10 3740 */
<> 140:97feb9bacc10 3741
<> 140:97feb9bacc10 3742 void arm_fir_interpolate_f32(
<> 140:97feb9bacc10 3743 const arm_fir_interpolate_instance_f32 * S,
<> 140:97feb9bacc10 3744 float32_t * pSrc,
<> 140:97feb9bacc10 3745 float32_t * pDst,
<> 140:97feb9bacc10 3746 uint32_t blockSize);
<> 140:97feb9bacc10 3747
<> 140:97feb9bacc10 3748 /**
<> 140:97feb9bacc10 3749 * @brief Initialization function for the floating-point FIR interpolator.
<> 140:97feb9bacc10 3750 * @param[in,out] *S points to an instance of the floating-point FIR interpolator structure.
<> 140:97feb9bacc10 3751 * @param[in] L upsample factor.
<> 140:97feb9bacc10 3752 * @param[in] numTaps number of filter coefficients in the filter.
<> 140:97feb9bacc10 3753 * @param[in] *pCoeffs points to the filter coefficient buffer.
<> 140:97feb9bacc10 3754 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3755 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 3756 * @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LENGTH_ERROR if
<> 140:97feb9bacc10 3757 * the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</code>.
<> 140:97feb9bacc10 3758 */
<> 140:97feb9bacc10 3759
<> 140:97feb9bacc10 3760 arm_status arm_fir_interpolate_init_f32(
<> 140:97feb9bacc10 3761 arm_fir_interpolate_instance_f32 * S,
<> 140:97feb9bacc10 3762 uint8_t L,
<> 140:97feb9bacc10 3763 uint16_t numTaps,
<> 140:97feb9bacc10 3764 float32_t * pCoeffs,
<> 140:97feb9bacc10 3765 float32_t * pState,
<> 140:97feb9bacc10 3766 uint32_t blockSize);
<> 140:97feb9bacc10 3767
<> 140:97feb9bacc10 3768 /**
<> 140:97feb9bacc10 3769 * @brief Instance structure for the high precision Q31 Biquad cascade filter.
<> 140:97feb9bacc10 3770 */
<> 140:97feb9bacc10 3771
<> 140:97feb9bacc10 3772 typedef struct
<> 140:97feb9bacc10 3773 {
<> 140:97feb9bacc10 3774 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 140:97feb9bacc10 3775 q63_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
<> 140:97feb9bacc10 3776 q31_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 140:97feb9bacc10 3777 uint8_t postShift; /**< additional shift, in bits, applied to each output sample. */
<> 140:97feb9bacc10 3778
<> 140:97feb9bacc10 3779 } arm_biquad_cas_df1_32x64_ins_q31;
<> 140:97feb9bacc10 3780
<> 140:97feb9bacc10 3781
<> 140:97feb9bacc10 3782 /**
<> 140:97feb9bacc10 3783 * @param[in] *S points to an instance of the high precision Q31 Biquad cascade filter structure.
<> 140:97feb9bacc10 3784 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3785 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3786 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 3787 * @return none.
<> 140:97feb9bacc10 3788 */
<> 140:97feb9bacc10 3789
<> 140:97feb9bacc10 3790 void arm_biquad_cas_df1_32x64_q31(
<> 140:97feb9bacc10 3791 const arm_biquad_cas_df1_32x64_ins_q31 * S,
<> 140:97feb9bacc10 3792 q31_t * pSrc,
<> 140:97feb9bacc10 3793 q31_t * pDst,
<> 140:97feb9bacc10 3794 uint32_t blockSize);
<> 140:97feb9bacc10 3795
<> 140:97feb9bacc10 3796
<> 140:97feb9bacc10 3797 /**
<> 140:97feb9bacc10 3798 * @param[in,out] *S points to an instance of the high precision Q31 Biquad cascade filter structure.
<> 140:97feb9bacc10 3799 * @param[in] numStages number of 2nd order stages in the filter.
<> 140:97feb9bacc10 3800 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 3801 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3802 * @param[in] postShift shift to be applied to the output. Varies according to the coefficients format
<> 140:97feb9bacc10 3803 * @return none
<> 140:97feb9bacc10 3804 */
<> 140:97feb9bacc10 3805
<> 140:97feb9bacc10 3806 void arm_biquad_cas_df1_32x64_init_q31(
<> 140:97feb9bacc10 3807 arm_biquad_cas_df1_32x64_ins_q31 * S,
<> 140:97feb9bacc10 3808 uint8_t numStages,
<> 140:97feb9bacc10 3809 q31_t * pCoeffs,
<> 140:97feb9bacc10 3810 q63_t * pState,
<> 140:97feb9bacc10 3811 uint8_t postShift);
<> 140:97feb9bacc10 3812
<> 140:97feb9bacc10 3813
<> 140:97feb9bacc10 3814
<> 140:97feb9bacc10 3815 /**
<> 140:97feb9bacc10 3816 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 140:97feb9bacc10 3817 */
<> 140:97feb9bacc10 3818
<> 140:97feb9bacc10 3819 typedef struct
<> 140:97feb9bacc10 3820 {
<> 140:97feb9bacc10 3821 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 140:97feb9bacc10 3822 float32_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
<> 140:97feb9bacc10 3823 float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 140:97feb9bacc10 3824 } arm_biquad_cascade_df2T_instance_f32;
<> 140:97feb9bacc10 3825
<> 140:97feb9bacc10 3826
<> 140:97feb9bacc10 3827
<> 140:97feb9bacc10 3828 /**
<> 140:97feb9bacc10 3829 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 140:97feb9bacc10 3830 */
<> 140:97feb9bacc10 3831
<> 140:97feb9bacc10 3832 typedef struct
<> 140:97feb9bacc10 3833 {
<> 140:97feb9bacc10 3834 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 140:97feb9bacc10 3835 float32_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
<> 140:97feb9bacc10 3836 float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 140:97feb9bacc10 3837 } arm_biquad_cascade_stereo_df2T_instance_f32;
<> 140:97feb9bacc10 3838
<> 140:97feb9bacc10 3839
<> 140:97feb9bacc10 3840
<> 140:97feb9bacc10 3841 /**
<> 140:97feb9bacc10 3842 * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
<> 140:97feb9bacc10 3843 */
<> 140:97feb9bacc10 3844
<> 140:97feb9bacc10 3845 typedef struct
<> 140:97feb9bacc10 3846 {
<> 140:97feb9bacc10 3847 uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
<> 140:97feb9bacc10 3848 float64_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
<> 140:97feb9bacc10 3849 float64_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
<> 140:97feb9bacc10 3850 } arm_biquad_cascade_df2T_instance_f64;
<> 140:97feb9bacc10 3851
<> 140:97feb9bacc10 3852
<> 140:97feb9bacc10 3853 /**
<> 140:97feb9bacc10 3854 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
<> 140:97feb9bacc10 3855 * @param[in] *S points to an instance of the filter data structure.
<> 140:97feb9bacc10 3856 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3857 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3858 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 3859 * @return none.
<> 140:97feb9bacc10 3860 */
<> 140:97feb9bacc10 3861
<> 140:97feb9bacc10 3862 void arm_biquad_cascade_df2T_f32(
<> 140:97feb9bacc10 3863 const arm_biquad_cascade_df2T_instance_f32 * S,
<> 140:97feb9bacc10 3864 float32_t * pSrc,
<> 140:97feb9bacc10 3865 float32_t * pDst,
<> 140:97feb9bacc10 3866 uint32_t blockSize);
<> 140:97feb9bacc10 3867
<> 140:97feb9bacc10 3868
<> 140:97feb9bacc10 3869 /**
<> 140:97feb9bacc10 3870 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter. 2 channels
<> 140:97feb9bacc10 3871 * @param[in] *S points to an instance of the filter data structure.
<> 140:97feb9bacc10 3872 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3873 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3874 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 3875 * @return none.
<> 140:97feb9bacc10 3876 */
<> 140:97feb9bacc10 3877
<> 140:97feb9bacc10 3878 void arm_biquad_cascade_stereo_df2T_f32(
<> 140:97feb9bacc10 3879 const arm_biquad_cascade_stereo_df2T_instance_f32 * S,
<> 140:97feb9bacc10 3880 float32_t * pSrc,
<> 140:97feb9bacc10 3881 float32_t * pDst,
<> 140:97feb9bacc10 3882 uint32_t blockSize);
<> 140:97feb9bacc10 3883
<> 140:97feb9bacc10 3884 /**
<> 140:97feb9bacc10 3885 * @brief Processing function for the floating-point transposed direct form II Biquad cascade filter.
<> 140:97feb9bacc10 3886 * @param[in] *S points to an instance of the filter data structure.
<> 140:97feb9bacc10 3887 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 3888 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 3889 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 3890 * @return none.
<> 140:97feb9bacc10 3891 */
<> 140:97feb9bacc10 3892
<> 140:97feb9bacc10 3893 void arm_biquad_cascade_df2T_f64(
<> 140:97feb9bacc10 3894 const arm_biquad_cascade_df2T_instance_f64 * S,
<> 140:97feb9bacc10 3895 float64_t * pSrc,
<> 140:97feb9bacc10 3896 float64_t * pDst,
<> 140:97feb9bacc10 3897 uint32_t blockSize);
<> 140:97feb9bacc10 3898
<> 140:97feb9bacc10 3899
<> 140:97feb9bacc10 3900 /**
<> 140:97feb9bacc10 3901 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 140:97feb9bacc10 3902 * @param[in,out] *S points to an instance of the filter data structure.
<> 140:97feb9bacc10 3903 * @param[in] numStages number of 2nd order stages in the filter.
<> 140:97feb9bacc10 3904 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 3905 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3906 * @return none
<> 140:97feb9bacc10 3907 */
<> 140:97feb9bacc10 3908
<> 140:97feb9bacc10 3909 void arm_biquad_cascade_df2T_init_f32(
<> 140:97feb9bacc10 3910 arm_biquad_cascade_df2T_instance_f32 * S,
<> 140:97feb9bacc10 3911 uint8_t numStages,
<> 140:97feb9bacc10 3912 float32_t * pCoeffs,
<> 140:97feb9bacc10 3913 float32_t * pState);
<> 140:97feb9bacc10 3914
<> 140:97feb9bacc10 3915
<> 140:97feb9bacc10 3916 /**
<> 140:97feb9bacc10 3917 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 140:97feb9bacc10 3918 * @param[in,out] *S points to an instance of the filter data structure.
<> 140:97feb9bacc10 3919 * @param[in] numStages number of 2nd order stages in the filter.
<> 140:97feb9bacc10 3920 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 3921 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3922 * @return none
<> 140:97feb9bacc10 3923 */
<> 140:97feb9bacc10 3924
<> 140:97feb9bacc10 3925 void arm_biquad_cascade_stereo_df2T_init_f32(
<> 140:97feb9bacc10 3926 arm_biquad_cascade_stereo_df2T_instance_f32 * S,
<> 140:97feb9bacc10 3927 uint8_t numStages,
<> 140:97feb9bacc10 3928 float32_t * pCoeffs,
<> 140:97feb9bacc10 3929 float32_t * pState);
<> 140:97feb9bacc10 3930
<> 140:97feb9bacc10 3931
<> 140:97feb9bacc10 3932 /**
<> 140:97feb9bacc10 3933 * @brief Initialization function for the floating-point transposed direct form II Biquad cascade filter.
<> 140:97feb9bacc10 3934 * @param[in,out] *S points to an instance of the filter data structure.
<> 140:97feb9bacc10 3935 * @param[in] numStages number of 2nd order stages in the filter.
<> 140:97feb9bacc10 3936 * @param[in] *pCoeffs points to the filter coefficients.
<> 140:97feb9bacc10 3937 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 3938 * @return none
<> 140:97feb9bacc10 3939 */
<> 140:97feb9bacc10 3940
<> 140:97feb9bacc10 3941 void arm_biquad_cascade_df2T_init_f64(
<> 140:97feb9bacc10 3942 arm_biquad_cascade_df2T_instance_f64 * S,
<> 140:97feb9bacc10 3943 uint8_t numStages,
<> 140:97feb9bacc10 3944 float64_t * pCoeffs,
<> 140:97feb9bacc10 3945 float64_t * pState);
<> 140:97feb9bacc10 3946
<> 140:97feb9bacc10 3947
<> 140:97feb9bacc10 3948
<> 140:97feb9bacc10 3949 /**
<> 140:97feb9bacc10 3950 * @brief Instance structure for the Q15 FIR lattice filter.
<> 140:97feb9bacc10 3951 */
<> 140:97feb9bacc10 3952
<> 140:97feb9bacc10 3953 typedef struct
<> 140:97feb9bacc10 3954 {
<> 140:97feb9bacc10 3955 uint16_t numStages; /**< number of filter stages. */
<> 140:97feb9bacc10 3956 q15_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 140:97feb9bacc10 3957 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 140:97feb9bacc10 3958 } arm_fir_lattice_instance_q15;
<> 140:97feb9bacc10 3959
<> 140:97feb9bacc10 3960 /**
<> 140:97feb9bacc10 3961 * @brief Instance structure for the Q31 FIR lattice filter.
<> 140:97feb9bacc10 3962 */
<> 140:97feb9bacc10 3963
<> 140:97feb9bacc10 3964 typedef struct
<> 140:97feb9bacc10 3965 {
<> 140:97feb9bacc10 3966 uint16_t numStages; /**< number of filter stages. */
<> 140:97feb9bacc10 3967 q31_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 140:97feb9bacc10 3968 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 140:97feb9bacc10 3969 } arm_fir_lattice_instance_q31;
<> 140:97feb9bacc10 3970
<> 140:97feb9bacc10 3971 /**
<> 140:97feb9bacc10 3972 * @brief Instance structure for the floating-point FIR lattice filter.
<> 140:97feb9bacc10 3973 */
<> 140:97feb9bacc10 3974
<> 140:97feb9bacc10 3975 typedef struct
<> 140:97feb9bacc10 3976 {
<> 140:97feb9bacc10 3977 uint16_t numStages; /**< number of filter stages. */
<> 140:97feb9bacc10 3978 float32_t *pState; /**< points to the state variable array. The array is of length numStages. */
<> 140:97feb9bacc10 3979 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
<> 140:97feb9bacc10 3980 } arm_fir_lattice_instance_f32;
<> 140:97feb9bacc10 3981
<> 140:97feb9bacc10 3982 /**
<> 140:97feb9bacc10 3983 * @brief Initialization function for the Q15 FIR lattice filter.
<> 140:97feb9bacc10 3984 * @param[in] *S points to an instance of the Q15 FIR lattice structure.
<> 140:97feb9bacc10 3985 * @param[in] numStages number of filter stages.
<> 140:97feb9bacc10 3986 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 140:97feb9bacc10 3987 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 140:97feb9bacc10 3988 * @return none.
<> 140:97feb9bacc10 3989 */
<> 140:97feb9bacc10 3990
<> 140:97feb9bacc10 3991 void arm_fir_lattice_init_q15(
<> 140:97feb9bacc10 3992 arm_fir_lattice_instance_q15 * S,
<> 140:97feb9bacc10 3993 uint16_t numStages,
<> 140:97feb9bacc10 3994 q15_t * pCoeffs,
<> 140:97feb9bacc10 3995 q15_t * pState);
<> 140:97feb9bacc10 3996
<> 140:97feb9bacc10 3997
<> 140:97feb9bacc10 3998 /**
<> 140:97feb9bacc10 3999 * @brief Processing function for the Q15 FIR lattice filter.
<> 140:97feb9bacc10 4000 * @param[in] *S points to an instance of the Q15 FIR lattice structure.
<> 140:97feb9bacc10 4001 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4002 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 4003 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4004 * @return none.
<> 140:97feb9bacc10 4005 */
<> 140:97feb9bacc10 4006 void arm_fir_lattice_q15(
<> 140:97feb9bacc10 4007 const arm_fir_lattice_instance_q15 * S,
<> 140:97feb9bacc10 4008 q15_t * pSrc,
<> 140:97feb9bacc10 4009 q15_t * pDst,
<> 140:97feb9bacc10 4010 uint32_t blockSize);
<> 140:97feb9bacc10 4011
<> 140:97feb9bacc10 4012 /**
<> 140:97feb9bacc10 4013 * @brief Initialization function for the Q31 FIR lattice filter.
<> 140:97feb9bacc10 4014 * @param[in] *S points to an instance of the Q31 FIR lattice structure.
<> 140:97feb9bacc10 4015 * @param[in] numStages number of filter stages.
<> 140:97feb9bacc10 4016 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 140:97feb9bacc10 4017 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 140:97feb9bacc10 4018 * @return none.
<> 140:97feb9bacc10 4019 */
<> 140:97feb9bacc10 4020
<> 140:97feb9bacc10 4021 void arm_fir_lattice_init_q31(
<> 140:97feb9bacc10 4022 arm_fir_lattice_instance_q31 * S,
<> 140:97feb9bacc10 4023 uint16_t numStages,
<> 140:97feb9bacc10 4024 q31_t * pCoeffs,
<> 140:97feb9bacc10 4025 q31_t * pState);
<> 140:97feb9bacc10 4026
<> 140:97feb9bacc10 4027
<> 140:97feb9bacc10 4028 /**
<> 140:97feb9bacc10 4029 * @brief Processing function for the Q31 FIR lattice filter.
<> 140:97feb9bacc10 4030 * @param[in] *S points to an instance of the Q31 FIR lattice structure.
<> 140:97feb9bacc10 4031 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4032 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 4033 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4034 * @return none.
<> 140:97feb9bacc10 4035 */
<> 140:97feb9bacc10 4036
<> 140:97feb9bacc10 4037 void arm_fir_lattice_q31(
<> 140:97feb9bacc10 4038 const arm_fir_lattice_instance_q31 * S,
<> 140:97feb9bacc10 4039 q31_t * pSrc,
<> 140:97feb9bacc10 4040 q31_t * pDst,
<> 140:97feb9bacc10 4041 uint32_t blockSize);
<> 140:97feb9bacc10 4042
<> 140:97feb9bacc10 4043 /**
<> 140:97feb9bacc10 4044 * @brief Initialization function for the floating-point FIR lattice filter.
<> 140:97feb9bacc10 4045 * @param[in] *S points to an instance of the floating-point FIR lattice structure.
<> 140:97feb9bacc10 4046 * @param[in] numStages number of filter stages.
<> 140:97feb9bacc10 4047 * @param[in] *pCoeffs points to the coefficient buffer. The array is of length numStages.
<> 140:97feb9bacc10 4048 * @param[in] *pState points to the state buffer. The array is of length numStages.
<> 140:97feb9bacc10 4049 * @return none.
<> 140:97feb9bacc10 4050 */
<> 140:97feb9bacc10 4051
<> 140:97feb9bacc10 4052 void arm_fir_lattice_init_f32(
<> 140:97feb9bacc10 4053 arm_fir_lattice_instance_f32 * S,
<> 140:97feb9bacc10 4054 uint16_t numStages,
<> 140:97feb9bacc10 4055 float32_t * pCoeffs,
<> 140:97feb9bacc10 4056 float32_t * pState);
<> 140:97feb9bacc10 4057
<> 140:97feb9bacc10 4058 /**
<> 140:97feb9bacc10 4059 * @brief Processing function for the floating-point FIR lattice filter.
<> 140:97feb9bacc10 4060 * @param[in] *S points to an instance of the floating-point FIR lattice structure.
<> 140:97feb9bacc10 4061 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4062 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 4063 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4064 * @return none.
<> 140:97feb9bacc10 4065 */
<> 140:97feb9bacc10 4066
<> 140:97feb9bacc10 4067 void arm_fir_lattice_f32(
<> 140:97feb9bacc10 4068 const arm_fir_lattice_instance_f32 * S,
<> 140:97feb9bacc10 4069 float32_t * pSrc,
<> 140:97feb9bacc10 4070 float32_t * pDst,
<> 140:97feb9bacc10 4071 uint32_t blockSize);
<> 140:97feb9bacc10 4072
<> 140:97feb9bacc10 4073 /**
<> 140:97feb9bacc10 4074 * @brief Instance structure for the Q15 IIR lattice filter.
<> 140:97feb9bacc10 4075 */
<> 140:97feb9bacc10 4076 typedef struct
<> 140:97feb9bacc10 4077 {
<> 140:97feb9bacc10 4078 uint16_t numStages; /**< number of stages in the filter. */
<> 140:97feb9bacc10 4079 q15_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 140:97feb9bacc10 4080 q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 140:97feb9bacc10 4081 q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 140:97feb9bacc10 4082 } arm_iir_lattice_instance_q15;
<> 140:97feb9bacc10 4083
<> 140:97feb9bacc10 4084 /**
<> 140:97feb9bacc10 4085 * @brief Instance structure for the Q31 IIR lattice filter.
<> 140:97feb9bacc10 4086 */
<> 140:97feb9bacc10 4087 typedef struct
<> 140:97feb9bacc10 4088 {
<> 140:97feb9bacc10 4089 uint16_t numStages; /**< number of stages in the filter. */
<> 140:97feb9bacc10 4090 q31_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 140:97feb9bacc10 4091 q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 140:97feb9bacc10 4092 q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 140:97feb9bacc10 4093 } arm_iir_lattice_instance_q31;
<> 140:97feb9bacc10 4094
<> 140:97feb9bacc10 4095 /**
<> 140:97feb9bacc10 4096 * @brief Instance structure for the floating-point IIR lattice filter.
<> 140:97feb9bacc10 4097 */
<> 140:97feb9bacc10 4098 typedef struct
<> 140:97feb9bacc10 4099 {
<> 140:97feb9bacc10 4100 uint16_t numStages; /**< number of stages in the filter. */
<> 140:97feb9bacc10 4101 float32_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
<> 140:97feb9bacc10 4102 float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
<> 140:97feb9bacc10 4103 float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
<> 140:97feb9bacc10 4104 } arm_iir_lattice_instance_f32;
<> 140:97feb9bacc10 4105
<> 140:97feb9bacc10 4106 /**
<> 140:97feb9bacc10 4107 * @brief Processing function for the floating-point IIR lattice filter.
<> 140:97feb9bacc10 4108 * @param[in] *S points to an instance of the floating-point IIR lattice structure.
<> 140:97feb9bacc10 4109 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4110 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 4111 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4112 * @return none.
<> 140:97feb9bacc10 4113 */
<> 140:97feb9bacc10 4114
<> 140:97feb9bacc10 4115 void arm_iir_lattice_f32(
<> 140:97feb9bacc10 4116 const arm_iir_lattice_instance_f32 * S,
<> 140:97feb9bacc10 4117 float32_t * pSrc,
<> 140:97feb9bacc10 4118 float32_t * pDst,
<> 140:97feb9bacc10 4119 uint32_t blockSize);
<> 140:97feb9bacc10 4120
<> 140:97feb9bacc10 4121 /**
<> 140:97feb9bacc10 4122 * @brief Initialization function for the floating-point IIR lattice filter.
<> 140:97feb9bacc10 4123 * @param[in] *S points to an instance of the floating-point IIR lattice structure.
<> 140:97feb9bacc10 4124 * @param[in] numStages number of stages in the filter.
<> 140:97feb9bacc10 4125 * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
<> 140:97feb9bacc10 4126 * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
<> 140:97feb9bacc10 4127 * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize-1.
<> 140:97feb9bacc10 4128 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4129 * @return none.
<> 140:97feb9bacc10 4130 */
<> 140:97feb9bacc10 4131
<> 140:97feb9bacc10 4132 void arm_iir_lattice_init_f32(
<> 140:97feb9bacc10 4133 arm_iir_lattice_instance_f32 * S,
<> 140:97feb9bacc10 4134 uint16_t numStages,
<> 140:97feb9bacc10 4135 float32_t * pkCoeffs,
<> 140:97feb9bacc10 4136 float32_t * pvCoeffs,
<> 140:97feb9bacc10 4137 float32_t * pState,
<> 140:97feb9bacc10 4138 uint32_t blockSize);
<> 140:97feb9bacc10 4139
<> 140:97feb9bacc10 4140
<> 140:97feb9bacc10 4141 /**
<> 140:97feb9bacc10 4142 * @brief Processing function for the Q31 IIR lattice filter.
<> 140:97feb9bacc10 4143 * @param[in] *S points to an instance of the Q31 IIR lattice structure.
<> 140:97feb9bacc10 4144 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4145 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 4146 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4147 * @return none.
<> 140:97feb9bacc10 4148 */
<> 140:97feb9bacc10 4149
<> 140:97feb9bacc10 4150 void arm_iir_lattice_q31(
<> 140:97feb9bacc10 4151 const arm_iir_lattice_instance_q31 * S,
<> 140:97feb9bacc10 4152 q31_t * pSrc,
<> 140:97feb9bacc10 4153 q31_t * pDst,
<> 140:97feb9bacc10 4154 uint32_t blockSize);
<> 140:97feb9bacc10 4155
<> 140:97feb9bacc10 4156
<> 140:97feb9bacc10 4157 /**
<> 140:97feb9bacc10 4158 * @brief Initialization function for the Q31 IIR lattice filter.
<> 140:97feb9bacc10 4159 * @param[in] *S points to an instance of the Q31 IIR lattice structure.
<> 140:97feb9bacc10 4160 * @param[in] numStages number of stages in the filter.
<> 140:97feb9bacc10 4161 * @param[in] *pkCoeffs points to the reflection coefficient buffer. The array is of length numStages.
<> 140:97feb9bacc10 4162 * @param[in] *pvCoeffs points to the ladder coefficient buffer. The array is of length numStages+1.
<> 140:97feb9bacc10 4163 * @param[in] *pState points to the state buffer. The array is of length numStages+blockSize.
<> 140:97feb9bacc10 4164 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4165 * @return none.
<> 140:97feb9bacc10 4166 */
<> 140:97feb9bacc10 4167
<> 140:97feb9bacc10 4168 void arm_iir_lattice_init_q31(
<> 140:97feb9bacc10 4169 arm_iir_lattice_instance_q31 * S,
<> 140:97feb9bacc10 4170 uint16_t numStages,
<> 140:97feb9bacc10 4171 q31_t * pkCoeffs,
<> 140:97feb9bacc10 4172 q31_t * pvCoeffs,
<> 140:97feb9bacc10 4173 q31_t * pState,
<> 140:97feb9bacc10 4174 uint32_t blockSize);
<> 140:97feb9bacc10 4175
<> 140:97feb9bacc10 4176
<> 140:97feb9bacc10 4177 /**
<> 140:97feb9bacc10 4178 * @brief Processing function for the Q15 IIR lattice filter.
<> 140:97feb9bacc10 4179 * @param[in] *S points to an instance of the Q15 IIR lattice structure.
<> 140:97feb9bacc10 4180 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4181 * @param[out] *pDst points to the block of output data.
<> 140:97feb9bacc10 4182 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4183 * @return none.
<> 140:97feb9bacc10 4184 */
<> 140:97feb9bacc10 4185
<> 140:97feb9bacc10 4186 void arm_iir_lattice_q15(
<> 140:97feb9bacc10 4187 const arm_iir_lattice_instance_q15 * S,
<> 140:97feb9bacc10 4188 q15_t * pSrc,
<> 140:97feb9bacc10 4189 q15_t * pDst,
<> 140:97feb9bacc10 4190 uint32_t blockSize);
<> 140:97feb9bacc10 4191
<> 140:97feb9bacc10 4192
<> 140:97feb9bacc10 4193 /**
<> 140:97feb9bacc10 4194 * @brief Initialization function for the Q15 IIR lattice filter.
<> 140:97feb9bacc10 4195 * @param[in] *S points to an instance of the fixed-point Q15 IIR lattice structure.
<> 140:97feb9bacc10 4196 * @param[in] numStages number of stages in the filter.
<> 140:97feb9bacc10 4197 * @param[in] *pkCoeffs points to reflection coefficient buffer. The array is of length numStages.
<> 140:97feb9bacc10 4198 * @param[in] *pvCoeffs points to ladder coefficient buffer. The array is of length numStages+1.
<> 140:97feb9bacc10 4199 * @param[in] *pState points to state buffer. The array is of length numStages+blockSize.
<> 140:97feb9bacc10 4200 * @param[in] blockSize number of samples to process per call.
<> 140:97feb9bacc10 4201 * @return none.
<> 140:97feb9bacc10 4202 */
<> 140:97feb9bacc10 4203
<> 140:97feb9bacc10 4204 void arm_iir_lattice_init_q15(
<> 140:97feb9bacc10 4205 arm_iir_lattice_instance_q15 * S,
<> 140:97feb9bacc10 4206 uint16_t numStages,
<> 140:97feb9bacc10 4207 q15_t * pkCoeffs,
<> 140:97feb9bacc10 4208 q15_t * pvCoeffs,
<> 140:97feb9bacc10 4209 q15_t * pState,
<> 140:97feb9bacc10 4210 uint32_t blockSize);
<> 140:97feb9bacc10 4211
<> 140:97feb9bacc10 4212 /**
<> 140:97feb9bacc10 4213 * @brief Instance structure for the floating-point LMS filter.
<> 140:97feb9bacc10 4214 */
<> 140:97feb9bacc10 4215
<> 140:97feb9bacc10 4216 typedef struct
<> 140:97feb9bacc10 4217 {
<> 140:97feb9bacc10 4218 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4219 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 4220 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 140:97feb9bacc10 4221 float32_t mu; /**< step size that controls filter coefficient updates. */
<> 140:97feb9bacc10 4222 } arm_lms_instance_f32;
<> 140:97feb9bacc10 4223
<> 140:97feb9bacc10 4224 /**
<> 140:97feb9bacc10 4225 * @brief Processing function for floating-point LMS filter.
<> 140:97feb9bacc10 4226 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 140:97feb9bacc10 4227 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4228 * @param[in] *pRef points to the block of reference data.
<> 140:97feb9bacc10 4229 * @param[out] *pOut points to the block of output data.
<> 140:97feb9bacc10 4230 * @param[out] *pErr points to the block of error data.
<> 140:97feb9bacc10 4231 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4232 * @return none.
<> 140:97feb9bacc10 4233 */
<> 140:97feb9bacc10 4234
<> 140:97feb9bacc10 4235 void arm_lms_f32(
<> 140:97feb9bacc10 4236 const arm_lms_instance_f32 * S,
<> 140:97feb9bacc10 4237 float32_t * pSrc,
<> 140:97feb9bacc10 4238 float32_t * pRef,
<> 140:97feb9bacc10 4239 float32_t * pOut,
<> 140:97feb9bacc10 4240 float32_t * pErr,
<> 140:97feb9bacc10 4241 uint32_t blockSize);
<> 140:97feb9bacc10 4242
<> 140:97feb9bacc10 4243 /**
<> 140:97feb9bacc10 4244 * @brief Initialization function for floating-point LMS filter.
<> 140:97feb9bacc10 4245 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 140:97feb9bacc10 4246 * @param[in] numTaps number of filter coefficients.
<> 140:97feb9bacc10 4247 * @param[in] *pCoeffs points to the coefficient buffer.
<> 140:97feb9bacc10 4248 * @param[in] *pState points to state buffer.
<> 140:97feb9bacc10 4249 * @param[in] mu step size that controls filter coefficient updates.
<> 140:97feb9bacc10 4250 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4251 * @return none.
<> 140:97feb9bacc10 4252 */
<> 140:97feb9bacc10 4253
<> 140:97feb9bacc10 4254 void arm_lms_init_f32(
<> 140:97feb9bacc10 4255 arm_lms_instance_f32 * S,
<> 140:97feb9bacc10 4256 uint16_t numTaps,
<> 140:97feb9bacc10 4257 float32_t * pCoeffs,
<> 140:97feb9bacc10 4258 float32_t * pState,
<> 140:97feb9bacc10 4259 float32_t mu,
<> 140:97feb9bacc10 4260 uint32_t blockSize);
<> 140:97feb9bacc10 4261
<> 140:97feb9bacc10 4262 /**
<> 140:97feb9bacc10 4263 * @brief Instance structure for the Q15 LMS filter.
<> 140:97feb9bacc10 4264 */
<> 140:97feb9bacc10 4265
<> 140:97feb9bacc10 4266 typedef struct
<> 140:97feb9bacc10 4267 {
<> 140:97feb9bacc10 4268 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4269 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 4270 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 140:97feb9bacc10 4271 q15_t mu; /**< step size that controls filter coefficient updates. */
<> 140:97feb9bacc10 4272 uint32_t postShift; /**< bit shift applied to coefficients. */
<> 140:97feb9bacc10 4273 } arm_lms_instance_q15;
<> 140:97feb9bacc10 4274
<> 140:97feb9bacc10 4275
<> 140:97feb9bacc10 4276 /**
<> 140:97feb9bacc10 4277 * @brief Initialization function for the Q15 LMS filter.
<> 140:97feb9bacc10 4278 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 140:97feb9bacc10 4279 * @param[in] numTaps number of filter coefficients.
<> 140:97feb9bacc10 4280 * @param[in] *pCoeffs points to the coefficient buffer.
<> 140:97feb9bacc10 4281 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 4282 * @param[in] mu step size that controls filter coefficient updates.
<> 140:97feb9bacc10 4283 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4284 * @param[in] postShift bit shift applied to coefficients.
<> 140:97feb9bacc10 4285 * @return none.
<> 140:97feb9bacc10 4286 */
<> 140:97feb9bacc10 4287
<> 140:97feb9bacc10 4288 void arm_lms_init_q15(
<> 140:97feb9bacc10 4289 arm_lms_instance_q15 * S,
<> 140:97feb9bacc10 4290 uint16_t numTaps,
<> 140:97feb9bacc10 4291 q15_t * pCoeffs,
<> 140:97feb9bacc10 4292 q15_t * pState,
<> 140:97feb9bacc10 4293 q15_t mu,
<> 140:97feb9bacc10 4294 uint32_t blockSize,
<> 140:97feb9bacc10 4295 uint32_t postShift);
<> 140:97feb9bacc10 4296
<> 140:97feb9bacc10 4297 /**
<> 140:97feb9bacc10 4298 * @brief Processing function for Q15 LMS filter.
<> 140:97feb9bacc10 4299 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 140:97feb9bacc10 4300 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4301 * @param[in] *pRef points to the block of reference data.
<> 140:97feb9bacc10 4302 * @param[out] *pOut points to the block of output data.
<> 140:97feb9bacc10 4303 * @param[out] *pErr points to the block of error data.
<> 140:97feb9bacc10 4304 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4305 * @return none.
<> 140:97feb9bacc10 4306 */
<> 140:97feb9bacc10 4307
<> 140:97feb9bacc10 4308 void arm_lms_q15(
<> 140:97feb9bacc10 4309 const arm_lms_instance_q15 * S,
<> 140:97feb9bacc10 4310 q15_t * pSrc,
<> 140:97feb9bacc10 4311 q15_t * pRef,
<> 140:97feb9bacc10 4312 q15_t * pOut,
<> 140:97feb9bacc10 4313 q15_t * pErr,
<> 140:97feb9bacc10 4314 uint32_t blockSize);
<> 140:97feb9bacc10 4315
<> 140:97feb9bacc10 4316
<> 140:97feb9bacc10 4317 /**
<> 140:97feb9bacc10 4318 * @brief Instance structure for the Q31 LMS filter.
<> 140:97feb9bacc10 4319 */
<> 140:97feb9bacc10 4320
<> 140:97feb9bacc10 4321 typedef struct
<> 140:97feb9bacc10 4322 {
<> 140:97feb9bacc10 4323 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4324 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 4325 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 140:97feb9bacc10 4326 q31_t mu; /**< step size that controls filter coefficient updates. */
<> 140:97feb9bacc10 4327 uint32_t postShift; /**< bit shift applied to coefficients. */
<> 140:97feb9bacc10 4328
<> 140:97feb9bacc10 4329 } arm_lms_instance_q31;
<> 140:97feb9bacc10 4330
<> 140:97feb9bacc10 4331 /**
<> 140:97feb9bacc10 4332 * @brief Processing function for Q31 LMS filter.
<> 140:97feb9bacc10 4333 * @param[in] *S points to an instance of the Q15 LMS filter structure.
<> 140:97feb9bacc10 4334 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4335 * @param[in] *pRef points to the block of reference data.
<> 140:97feb9bacc10 4336 * @param[out] *pOut points to the block of output data.
<> 140:97feb9bacc10 4337 * @param[out] *pErr points to the block of error data.
<> 140:97feb9bacc10 4338 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4339 * @return none.
<> 140:97feb9bacc10 4340 */
<> 140:97feb9bacc10 4341
<> 140:97feb9bacc10 4342 void arm_lms_q31(
<> 140:97feb9bacc10 4343 const arm_lms_instance_q31 * S,
<> 140:97feb9bacc10 4344 q31_t * pSrc,
<> 140:97feb9bacc10 4345 q31_t * pRef,
<> 140:97feb9bacc10 4346 q31_t * pOut,
<> 140:97feb9bacc10 4347 q31_t * pErr,
<> 140:97feb9bacc10 4348 uint32_t blockSize);
<> 140:97feb9bacc10 4349
<> 140:97feb9bacc10 4350 /**
<> 140:97feb9bacc10 4351 * @brief Initialization function for Q31 LMS filter.
<> 140:97feb9bacc10 4352 * @param[in] *S points to an instance of the Q31 LMS filter structure.
<> 140:97feb9bacc10 4353 * @param[in] numTaps number of filter coefficients.
<> 140:97feb9bacc10 4354 * @param[in] *pCoeffs points to coefficient buffer.
<> 140:97feb9bacc10 4355 * @param[in] *pState points to state buffer.
<> 140:97feb9bacc10 4356 * @param[in] mu step size that controls filter coefficient updates.
<> 140:97feb9bacc10 4357 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4358 * @param[in] postShift bit shift applied to coefficients.
<> 140:97feb9bacc10 4359 * @return none.
<> 140:97feb9bacc10 4360 */
<> 140:97feb9bacc10 4361
<> 140:97feb9bacc10 4362 void arm_lms_init_q31(
<> 140:97feb9bacc10 4363 arm_lms_instance_q31 * S,
<> 140:97feb9bacc10 4364 uint16_t numTaps,
<> 140:97feb9bacc10 4365 q31_t * pCoeffs,
<> 140:97feb9bacc10 4366 q31_t * pState,
<> 140:97feb9bacc10 4367 q31_t mu,
<> 140:97feb9bacc10 4368 uint32_t blockSize,
<> 140:97feb9bacc10 4369 uint32_t postShift);
<> 140:97feb9bacc10 4370
<> 140:97feb9bacc10 4371 /**
<> 140:97feb9bacc10 4372 * @brief Instance structure for the floating-point normalized LMS filter.
<> 140:97feb9bacc10 4373 */
<> 140:97feb9bacc10 4374
<> 140:97feb9bacc10 4375 typedef struct
<> 140:97feb9bacc10 4376 {
<> 140:97feb9bacc10 4377 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4378 float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 4379 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 140:97feb9bacc10 4380 float32_t mu; /**< step size that control filter coefficient updates. */
<> 140:97feb9bacc10 4381 float32_t energy; /**< saves previous frame energy. */
<> 140:97feb9bacc10 4382 float32_t x0; /**< saves previous input sample. */
<> 140:97feb9bacc10 4383 } arm_lms_norm_instance_f32;
<> 140:97feb9bacc10 4384
<> 140:97feb9bacc10 4385 /**
<> 140:97feb9bacc10 4386 * @brief Processing function for floating-point normalized LMS filter.
<> 140:97feb9bacc10 4387 * @param[in] *S points to an instance of the floating-point normalized LMS filter structure.
<> 140:97feb9bacc10 4388 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4389 * @param[in] *pRef points to the block of reference data.
<> 140:97feb9bacc10 4390 * @param[out] *pOut points to the block of output data.
<> 140:97feb9bacc10 4391 * @param[out] *pErr points to the block of error data.
<> 140:97feb9bacc10 4392 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4393 * @return none.
<> 140:97feb9bacc10 4394 */
<> 140:97feb9bacc10 4395
<> 140:97feb9bacc10 4396 void arm_lms_norm_f32(
<> 140:97feb9bacc10 4397 arm_lms_norm_instance_f32 * S,
<> 140:97feb9bacc10 4398 float32_t * pSrc,
<> 140:97feb9bacc10 4399 float32_t * pRef,
<> 140:97feb9bacc10 4400 float32_t * pOut,
<> 140:97feb9bacc10 4401 float32_t * pErr,
<> 140:97feb9bacc10 4402 uint32_t blockSize);
<> 140:97feb9bacc10 4403
<> 140:97feb9bacc10 4404 /**
<> 140:97feb9bacc10 4405 * @brief Initialization function for floating-point normalized LMS filter.
<> 140:97feb9bacc10 4406 * @param[in] *S points to an instance of the floating-point LMS filter structure.
<> 140:97feb9bacc10 4407 * @param[in] numTaps number of filter coefficients.
<> 140:97feb9bacc10 4408 * @param[in] *pCoeffs points to coefficient buffer.
<> 140:97feb9bacc10 4409 * @param[in] *pState points to state buffer.
<> 140:97feb9bacc10 4410 * @param[in] mu step size that controls filter coefficient updates.
<> 140:97feb9bacc10 4411 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4412 * @return none.
<> 140:97feb9bacc10 4413 */
<> 140:97feb9bacc10 4414
<> 140:97feb9bacc10 4415 void arm_lms_norm_init_f32(
<> 140:97feb9bacc10 4416 arm_lms_norm_instance_f32 * S,
<> 140:97feb9bacc10 4417 uint16_t numTaps,
<> 140:97feb9bacc10 4418 float32_t * pCoeffs,
<> 140:97feb9bacc10 4419 float32_t * pState,
<> 140:97feb9bacc10 4420 float32_t mu,
<> 140:97feb9bacc10 4421 uint32_t blockSize);
<> 140:97feb9bacc10 4422
<> 140:97feb9bacc10 4423
<> 140:97feb9bacc10 4424 /**
<> 140:97feb9bacc10 4425 * @brief Instance structure for the Q31 normalized LMS filter.
<> 140:97feb9bacc10 4426 */
<> 140:97feb9bacc10 4427 typedef struct
<> 140:97feb9bacc10 4428 {
<> 140:97feb9bacc10 4429 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4430 q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 4431 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 140:97feb9bacc10 4432 q31_t mu; /**< step size that controls filter coefficient updates. */
<> 140:97feb9bacc10 4433 uint8_t postShift; /**< bit shift applied to coefficients. */
<> 140:97feb9bacc10 4434 q31_t *recipTable; /**< points to the reciprocal initial value table. */
<> 140:97feb9bacc10 4435 q31_t energy; /**< saves previous frame energy. */
<> 140:97feb9bacc10 4436 q31_t x0; /**< saves previous input sample. */
<> 140:97feb9bacc10 4437 } arm_lms_norm_instance_q31;
<> 140:97feb9bacc10 4438
<> 140:97feb9bacc10 4439 /**
<> 140:97feb9bacc10 4440 * @brief Processing function for Q31 normalized LMS filter.
<> 140:97feb9bacc10 4441 * @param[in] *S points to an instance of the Q31 normalized LMS filter structure.
<> 140:97feb9bacc10 4442 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4443 * @param[in] *pRef points to the block of reference data.
<> 140:97feb9bacc10 4444 * @param[out] *pOut points to the block of output data.
<> 140:97feb9bacc10 4445 * @param[out] *pErr points to the block of error data.
<> 140:97feb9bacc10 4446 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4447 * @return none.
<> 140:97feb9bacc10 4448 */
<> 140:97feb9bacc10 4449
<> 140:97feb9bacc10 4450 void arm_lms_norm_q31(
<> 140:97feb9bacc10 4451 arm_lms_norm_instance_q31 * S,
<> 140:97feb9bacc10 4452 q31_t * pSrc,
<> 140:97feb9bacc10 4453 q31_t * pRef,
<> 140:97feb9bacc10 4454 q31_t * pOut,
<> 140:97feb9bacc10 4455 q31_t * pErr,
<> 140:97feb9bacc10 4456 uint32_t blockSize);
<> 140:97feb9bacc10 4457
<> 140:97feb9bacc10 4458 /**
<> 140:97feb9bacc10 4459 * @brief Initialization function for Q31 normalized LMS filter.
<> 140:97feb9bacc10 4460 * @param[in] *S points to an instance of the Q31 normalized LMS filter structure.
<> 140:97feb9bacc10 4461 * @param[in] numTaps number of filter coefficients.
<> 140:97feb9bacc10 4462 * @param[in] *pCoeffs points to coefficient buffer.
<> 140:97feb9bacc10 4463 * @param[in] *pState points to state buffer.
<> 140:97feb9bacc10 4464 * @param[in] mu step size that controls filter coefficient updates.
<> 140:97feb9bacc10 4465 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4466 * @param[in] postShift bit shift applied to coefficients.
<> 140:97feb9bacc10 4467 * @return none.
<> 140:97feb9bacc10 4468 */
<> 140:97feb9bacc10 4469
<> 140:97feb9bacc10 4470 void arm_lms_norm_init_q31(
<> 140:97feb9bacc10 4471 arm_lms_norm_instance_q31 * S,
<> 140:97feb9bacc10 4472 uint16_t numTaps,
<> 140:97feb9bacc10 4473 q31_t * pCoeffs,
<> 140:97feb9bacc10 4474 q31_t * pState,
<> 140:97feb9bacc10 4475 q31_t mu,
<> 140:97feb9bacc10 4476 uint32_t blockSize,
<> 140:97feb9bacc10 4477 uint8_t postShift);
<> 140:97feb9bacc10 4478
<> 140:97feb9bacc10 4479 /**
<> 140:97feb9bacc10 4480 * @brief Instance structure for the Q15 normalized LMS filter.
<> 140:97feb9bacc10 4481 */
<> 140:97feb9bacc10 4482
<> 140:97feb9bacc10 4483 typedef struct
<> 140:97feb9bacc10 4484 {
<> 140:97feb9bacc10 4485 uint16_t numTaps; /**< Number of coefficients in the filter. */
<> 140:97feb9bacc10 4486 q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
<> 140:97feb9bacc10 4487 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
<> 140:97feb9bacc10 4488 q15_t mu; /**< step size that controls filter coefficient updates. */
<> 140:97feb9bacc10 4489 uint8_t postShift; /**< bit shift applied to coefficients. */
<> 140:97feb9bacc10 4490 q15_t *recipTable; /**< Points to the reciprocal initial value table. */
<> 140:97feb9bacc10 4491 q15_t energy; /**< saves previous frame energy. */
<> 140:97feb9bacc10 4492 q15_t x0; /**< saves previous input sample. */
<> 140:97feb9bacc10 4493 } arm_lms_norm_instance_q15;
<> 140:97feb9bacc10 4494
<> 140:97feb9bacc10 4495 /**
<> 140:97feb9bacc10 4496 * @brief Processing function for Q15 normalized LMS filter.
<> 140:97feb9bacc10 4497 * @param[in] *S points to an instance of the Q15 normalized LMS filter structure.
<> 140:97feb9bacc10 4498 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4499 * @param[in] *pRef points to the block of reference data.
<> 140:97feb9bacc10 4500 * @param[out] *pOut points to the block of output data.
<> 140:97feb9bacc10 4501 * @param[out] *pErr points to the block of error data.
<> 140:97feb9bacc10 4502 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4503 * @return none.
<> 140:97feb9bacc10 4504 */
<> 140:97feb9bacc10 4505
<> 140:97feb9bacc10 4506 void arm_lms_norm_q15(
<> 140:97feb9bacc10 4507 arm_lms_norm_instance_q15 * S,
<> 140:97feb9bacc10 4508 q15_t * pSrc,
<> 140:97feb9bacc10 4509 q15_t * pRef,
<> 140:97feb9bacc10 4510 q15_t * pOut,
<> 140:97feb9bacc10 4511 q15_t * pErr,
<> 140:97feb9bacc10 4512 uint32_t blockSize);
<> 140:97feb9bacc10 4513
<> 140:97feb9bacc10 4514
<> 140:97feb9bacc10 4515 /**
<> 140:97feb9bacc10 4516 * @brief Initialization function for Q15 normalized LMS filter.
<> 140:97feb9bacc10 4517 * @param[in] *S points to an instance of the Q15 normalized LMS filter structure.
<> 140:97feb9bacc10 4518 * @param[in] numTaps number of filter coefficients.
<> 140:97feb9bacc10 4519 * @param[in] *pCoeffs points to coefficient buffer.
<> 140:97feb9bacc10 4520 * @param[in] *pState points to state buffer.
<> 140:97feb9bacc10 4521 * @param[in] mu step size that controls filter coefficient updates.
<> 140:97feb9bacc10 4522 * @param[in] blockSize number of samples to process.
<> 140:97feb9bacc10 4523 * @param[in] postShift bit shift applied to coefficients.
<> 140:97feb9bacc10 4524 * @return none.
<> 140:97feb9bacc10 4525 */
<> 140:97feb9bacc10 4526
<> 140:97feb9bacc10 4527 void arm_lms_norm_init_q15(
<> 140:97feb9bacc10 4528 arm_lms_norm_instance_q15 * S,
<> 140:97feb9bacc10 4529 uint16_t numTaps,
<> 140:97feb9bacc10 4530 q15_t * pCoeffs,
<> 140:97feb9bacc10 4531 q15_t * pState,
<> 140:97feb9bacc10 4532 q15_t mu,
<> 140:97feb9bacc10 4533 uint32_t blockSize,
<> 140:97feb9bacc10 4534 uint8_t postShift);
<> 140:97feb9bacc10 4535
<> 140:97feb9bacc10 4536 /**
<> 140:97feb9bacc10 4537 * @brief Correlation of floating-point sequences.
<> 140:97feb9bacc10 4538 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4539 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4540 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4541 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4542 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4543 * @return none.
<> 140:97feb9bacc10 4544 */
<> 140:97feb9bacc10 4545
<> 140:97feb9bacc10 4546 void arm_correlate_f32(
<> 140:97feb9bacc10 4547 float32_t * pSrcA,
<> 140:97feb9bacc10 4548 uint32_t srcALen,
<> 140:97feb9bacc10 4549 float32_t * pSrcB,
<> 140:97feb9bacc10 4550 uint32_t srcBLen,
<> 140:97feb9bacc10 4551 float32_t * pDst);
<> 140:97feb9bacc10 4552
<> 140:97feb9bacc10 4553
<> 140:97feb9bacc10 4554 /**
<> 140:97feb9bacc10 4555 * @brief Correlation of Q15 sequences
<> 140:97feb9bacc10 4556 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4557 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4558 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4559 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4560 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4561 * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 4562 * @return none.
<> 140:97feb9bacc10 4563 */
<> 140:97feb9bacc10 4564 void arm_correlate_opt_q15(
<> 140:97feb9bacc10 4565 q15_t * pSrcA,
<> 140:97feb9bacc10 4566 uint32_t srcALen,
<> 140:97feb9bacc10 4567 q15_t * pSrcB,
<> 140:97feb9bacc10 4568 uint32_t srcBLen,
<> 140:97feb9bacc10 4569 q15_t * pDst,
<> 140:97feb9bacc10 4570 q15_t * pScratch);
<> 140:97feb9bacc10 4571
<> 140:97feb9bacc10 4572
<> 140:97feb9bacc10 4573 /**
<> 140:97feb9bacc10 4574 * @brief Correlation of Q15 sequences.
<> 140:97feb9bacc10 4575 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4576 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4577 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4578 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4579 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4580 * @return none.
<> 140:97feb9bacc10 4581 */
<> 140:97feb9bacc10 4582
<> 140:97feb9bacc10 4583 void arm_correlate_q15(
<> 140:97feb9bacc10 4584 q15_t * pSrcA,
<> 140:97feb9bacc10 4585 uint32_t srcALen,
<> 140:97feb9bacc10 4586 q15_t * pSrcB,
<> 140:97feb9bacc10 4587 uint32_t srcBLen,
<> 140:97feb9bacc10 4588 q15_t * pDst);
<> 140:97feb9bacc10 4589
<> 140:97feb9bacc10 4590 /**
<> 140:97feb9bacc10 4591 * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
<> 140:97feb9bacc10 4592 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4593 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4594 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4595 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4596 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4597 * @return none.
<> 140:97feb9bacc10 4598 */
<> 140:97feb9bacc10 4599
<> 140:97feb9bacc10 4600 void arm_correlate_fast_q15(
<> 140:97feb9bacc10 4601 q15_t * pSrcA,
<> 140:97feb9bacc10 4602 uint32_t srcALen,
<> 140:97feb9bacc10 4603 q15_t * pSrcB,
<> 140:97feb9bacc10 4604 uint32_t srcBLen,
<> 140:97feb9bacc10 4605 q15_t * pDst);
<> 140:97feb9bacc10 4606
<> 140:97feb9bacc10 4607
<> 140:97feb9bacc10 4608
<> 140:97feb9bacc10 4609 /**
<> 140:97feb9bacc10 4610 * @brief Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
<> 140:97feb9bacc10 4611 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4612 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4613 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4614 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4615 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4616 * @param[in] *pScratch points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 4617 * @return none.
<> 140:97feb9bacc10 4618 */
<> 140:97feb9bacc10 4619
<> 140:97feb9bacc10 4620 void arm_correlate_fast_opt_q15(
<> 140:97feb9bacc10 4621 q15_t * pSrcA,
<> 140:97feb9bacc10 4622 uint32_t srcALen,
<> 140:97feb9bacc10 4623 q15_t * pSrcB,
<> 140:97feb9bacc10 4624 uint32_t srcBLen,
<> 140:97feb9bacc10 4625 q15_t * pDst,
<> 140:97feb9bacc10 4626 q15_t * pScratch);
<> 140:97feb9bacc10 4627
<> 140:97feb9bacc10 4628 /**
<> 140:97feb9bacc10 4629 * @brief Correlation of Q31 sequences.
<> 140:97feb9bacc10 4630 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4631 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4632 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4633 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4634 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4635 * @return none.
<> 140:97feb9bacc10 4636 */
<> 140:97feb9bacc10 4637
<> 140:97feb9bacc10 4638 void arm_correlate_q31(
<> 140:97feb9bacc10 4639 q31_t * pSrcA,
<> 140:97feb9bacc10 4640 uint32_t srcALen,
<> 140:97feb9bacc10 4641 q31_t * pSrcB,
<> 140:97feb9bacc10 4642 uint32_t srcBLen,
<> 140:97feb9bacc10 4643 q31_t * pDst);
<> 140:97feb9bacc10 4644
<> 140:97feb9bacc10 4645 /**
<> 140:97feb9bacc10 4646 * @brief Correlation of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4
<> 140:97feb9bacc10 4647 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4648 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4649 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4650 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4651 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4652 * @return none.
<> 140:97feb9bacc10 4653 */
<> 140:97feb9bacc10 4654
<> 140:97feb9bacc10 4655 void arm_correlate_fast_q31(
<> 140:97feb9bacc10 4656 q31_t * pSrcA,
<> 140:97feb9bacc10 4657 uint32_t srcALen,
<> 140:97feb9bacc10 4658 q31_t * pSrcB,
<> 140:97feb9bacc10 4659 uint32_t srcBLen,
<> 140:97feb9bacc10 4660 q31_t * pDst);
<> 140:97feb9bacc10 4661
<> 140:97feb9bacc10 4662
<> 140:97feb9bacc10 4663
<> 140:97feb9bacc10 4664 /**
<> 140:97feb9bacc10 4665 * @brief Correlation of Q7 sequences.
<> 140:97feb9bacc10 4666 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4667 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4668 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4669 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4670 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4671 * @param[in] *pScratch1 points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2.
<> 140:97feb9bacc10 4672 * @param[in] *pScratch2 points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen).
<> 140:97feb9bacc10 4673 * @return none.
<> 140:97feb9bacc10 4674 */
<> 140:97feb9bacc10 4675
<> 140:97feb9bacc10 4676 void arm_correlate_opt_q7(
<> 140:97feb9bacc10 4677 q7_t * pSrcA,
<> 140:97feb9bacc10 4678 uint32_t srcALen,
<> 140:97feb9bacc10 4679 q7_t * pSrcB,
<> 140:97feb9bacc10 4680 uint32_t srcBLen,
<> 140:97feb9bacc10 4681 q7_t * pDst,
<> 140:97feb9bacc10 4682 q15_t * pScratch1,
<> 140:97feb9bacc10 4683 q15_t * pScratch2);
<> 140:97feb9bacc10 4684
<> 140:97feb9bacc10 4685
<> 140:97feb9bacc10 4686 /**
<> 140:97feb9bacc10 4687 * @brief Correlation of Q7 sequences.
<> 140:97feb9bacc10 4688 * @param[in] *pSrcA points to the first input sequence.
<> 140:97feb9bacc10 4689 * @param[in] srcALen length of the first input sequence.
<> 140:97feb9bacc10 4690 * @param[in] *pSrcB points to the second input sequence.
<> 140:97feb9bacc10 4691 * @param[in] srcBLen length of the second input sequence.
<> 140:97feb9bacc10 4692 * @param[out] *pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
<> 140:97feb9bacc10 4693 * @return none.
<> 140:97feb9bacc10 4694 */
<> 140:97feb9bacc10 4695
<> 140:97feb9bacc10 4696 void arm_correlate_q7(
<> 140:97feb9bacc10 4697 q7_t * pSrcA,
<> 140:97feb9bacc10 4698 uint32_t srcALen,
<> 140:97feb9bacc10 4699 q7_t * pSrcB,
<> 140:97feb9bacc10 4700 uint32_t srcBLen,
<> 140:97feb9bacc10 4701 q7_t * pDst);
<> 140:97feb9bacc10 4702
<> 140:97feb9bacc10 4703
<> 140:97feb9bacc10 4704 /**
<> 140:97feb9bacc10 4705 * @brief Instance structure for the floating-point sparse FIR filter.
<> 140:97feb9bacc10 4706 */
<> 140:97feb9bacc10 4707 typedef struct
<> 140:97feb9bacc10 4708 {
<> 140:97feb9bacc10 4709 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4710 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 140:97feb9bacc10 4711 float32_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 140:97feb9bacc10 4712 float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 4713 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 140:97feb9bacc10 4714 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 140:97feb9bacc10 4715 } arm_fir_sparse_instance_f32;
<> 140:97feb9bacc10 4716
<> 140:97feb9bacc10 4717 /**
<> 140:97feb9bacc10 4718 * @brief Instance structure for the Q31 sparse FIR filter.
<> 140:97feb9bacc10 4719 */
<> 140:97feb9bacc10 4720
<> 140:97feb9bacc10 4721 typedef struct
<> 140:97feb9bacc10 4722 {
<> 140:97feb9bacc10 4723 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4724 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 140:97feb9bacc10 4725 q31_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 140:97feb9bacc10 4726 q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 4727 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 140:97feb9bacc10 4728 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 140:97feb9bacc10 4729 } arm_fir_sparse_instance_q31;
<> 140:97feb9bacc10 4730
<> 140:97feb9bacc10 4731 /**
<> 140:97feb9bacc10 4732 * @brief Instance structure for the Q15 sparse FIR filter.
<> 140:97feb9bacc10 4733 */
<> 140:97feb9bacc10 4734
<> 140:97feb9bacc10 4735 typedef struct
<> 140:97feb9bacc10 4736 {
<> 140:97feb9bacc10 4737 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4738 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 140:97feb9bacc10 4739 q15_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 140:97feb9bacc10 4740 q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 4741 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 140:97feb9bacc10 4742 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 140:97feb9bacc10 4743 } arm_fir_sparse_instance_q15;
<> 140:97feb9bacc10 4744
<> 140:97feb9bacc10 4745 /**
<> 140:97feb9bacc10 4746 * @brief Instance structure for the Q7 sparse FIR filter.
<> 140:97feb9bacc10 4747 */
<> 140:97feb9bacc10 4748
<> 140:97feb9bacc10 4749 typedef struct
<> 140:97feb9bacc10 4750 {
<> 140:97feb9bacc10 4751 uint16_t numTaps; /**< number of coefficients in the filter. */
<> 140:97feb9bacc10 4752 uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
<> 140:97feb9bacc10 4753 q7_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
<> 140:97feb9bacc10 4754 q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
<> 140:97feb9bacc10 4755 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
<> 140:97feb9bacc10 4756 int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
<> 140:97feb9bacc10 4757 } arm_fir_sparse_instance_q7;
<> 140:97feb9bacc10 4758
<> 140:97feb9bacc10 4759 /**
<> 140:97feb9bacc10 4760 * @brief Processing function for the floating-point sparse FIR filter.
<> 140:97feb9bacc10 4761 * @param[in] *S points to an instance of the floating-point sparse FIR structure.
<> 140:97feb9bacc10 4762 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4763 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 4764 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 140:97feb9bacc10 4765 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 4766 * @return none.
<> 140:97feb9bacc10 4767 */
<> 140:97feb9bacc10 4768
<> 140:97feb9bacc10 4769 void arm_fir_sparse_f32(
<> 140:97feb9bacc10 4770 arm_fir_sparse_instance_f32 * S,
<> 140:97feb9bacc10 4771 float32_t * pSrc,
<> 140:97feb9bacc10 4772 float32_t * pDst,
<> 140:97feb9bacc10 4773 float32_t * pScratchIn,
<> 140:97feb9bacc10 4774 uint32_t blockSize);
<> 140:97feb9bacc10 4775
<> 140:97feb9bacc10 4776 /**
<> 140:97feb9bacc10 4777 * @brief Initialization function for the floating-point sparse FIR filter.
<> 140:97feb9bacc10 4778 * @param[in,out] *S points to an instance of the floating-point sparse FIR structure.
<> 140:97feb9bacc10 4779 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 140:97feb9bacc10 4780 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 140:97feb9bacc10 4781 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 4782 * @param[in] *pTapDelay points to the array of offset times.
<> 140:97feb9bacc10 4783 * @param[in] maxDelay maximum offset time supported.
<> 140:97feb9bacc10 4784 * @param[in] blockSize number of samples that will be processed per block.
<> 140:97feb9bacc10 4785 * @return none
<> 140:97feb9bacc10 4786 */
<> 140:97feb9bacc10 4787
<> 140:97feb9bacc10 4788 void arm_fir_sparse_init_f32(
<> 140:97feb9bacc10 4789 arm_fir_sparse_instance_f32 * S,
<> 140:97feb9bacc10 4790 uint16_t numTaps,
<> 140:97feb9bacc10 4791 float32_t * pCoeffs,
<> 140:97feb9bacc10 4792 float32_t * pState,
<> 140:97feb9bacc10 4793 int32_t * pTapDelay,
<> 140:97feb9bacc10 4794 uint16_t maxDelay,
<> 140:97feb9bacc10 4795 uint32_t blockSize);
<> 140:97feb9bacc10 4796
<> 140:97feb9bacc10 4797 /**
<> 140:97feb9bacc10 4798 * @brief Processing function for the Q31 sparse FIR filter.
<> 140:97feb9bacc10 4799 * @param[in] *S points to an instance of the Q31 sparse FIR structure.
<> 140:97feb9bacc10 4800 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4801 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 4802 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 140:97feb9bacc10 4803 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 4804 * @return none.
<> 140:97feb9bacc10 4805 */
<> 140:97feb9bacc10 4806
<> 140:97feb9bacc10 4807 void arm_fir_sparse_q31(
<> 140:97feb9bacc10 4808 arm_fir_sparse_instance_q31 * S,
<> 140:97feb9bacc10 4809 q31_t * pSrc,
<> 140:97feb9bacc10 4810 q31_t * pDst,
<> 140:97feb9bacc10 4811 q31_t * pScratchIn,
<> 140:97feb9bacc10 4812 uint32_t blockSize);
<> 140:97feb9bacc10 4813
<> 140:97feb9bacc10 4814 /**
<> 140:97feb9bacc10 4815 * @brief Initialization function for the Q31 sparse FIR filter.
<> 140:97feb9bacc10 4816 * @param[in,out] *S points to an instance of the Q31 sparse FIR structure.
<> 140:97feb9bacc10 4817 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 140:97feb9bacc10 4818 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 140:97feb9bacc10 4819 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 4820 * @param[in] *pTapDelay points to the array of offset times.
<> 140:97feb9bacc10 4821 * @param[in] maxDelay maximum offset time supported.
<> 140:97feb9bacc10 4822 * @param[in] blockSize number of samples that will be processed per block.
<> 140:97feb9bacc10 4823 * @return none
<> 140:97feb9bacc10 4824 */
<> 140:97feb9bacc10 4825
<> 140:97feb9bacc10 4826 void arm_fir_sparse_init_q31(
<> 140:97feb9bacc10 4827 arm_fir_sparse_instance_q31 * S,
<> 140:97feb9bacc10 4828 uint16_t numTaps,
<> 140:97feb9bacc10 4829 q31_t * pCoeffs,
<> 140:97feb9bacc10 4830 q31_t * pState,
<> 140:97feb9bacc10 4831 int32_t * pTapDelay,
<> 140:97feb9bacc10 4832 uint16_t maxDelay,
<> 140:97feb9bacc10 4833 uint32_t blockSize);
<> 140:97feb9bacc10 4834
<> 140:97feb9bacc10 4835 /**
<> 140:97feb9bacc10 4836 * @brief Processing function for the Q15 sparse FIR filter.
<> 140:97feb9bacc10 4837 * @param[in] *S points to an instance of the Q15 sparse FIR structure.
<> 140:97feb9bacc10 4838 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4839 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 4840 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 140:97feb9bacc10 4841 * @param[in] *pScratchOut points to a temporary buffer of size blockSize.
<> 140:97feb9bacc10 4842 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 4843 * @return none.
<> 140:97feb9bacc10 4844 */
<> 140:97feb9bacc10 4845
<> 140:97feb9bacc10 4846 void arm_fir_sparse_q15(
<> 140:97feb9bacc10 4847 arm_fir_sparse_instance_q15 * S,
<> 140:97feb9bacc10 4848 q15_t * pSrc,
<> 140:97feb9bacc10 4849 q15_t * pDst,
<> 140:97feb9bacc10 4850 q15_t * pScratchIn,
<> 140:97feb9bacc10 4851 q31_t * pScratchOut,
<> 140:97feb9bacc10 4852 uint32_t blockSize);
<> 140:97feb9bacc10 4853
<> 140:97feb9bacc10 4854
<> 140:97feb9bacc10 4855 /**
<> 140:97feb9bacc10 4856 * @brief Initialization function for the Q15 sparse FIR filter.
<> 140:97feb9bacc10 4857 * @param[in,out] *S points to an instance of the Q15 sparse FIR structure.
<> 140:97feb9bacc10 4858 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 140:97feb9bacc10 4859 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 140:97feb9bacc10 4860 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 4861 * @param[in] *pTapDelay points to the array of offset times.
<> 140:97feb9bacc10 4862 * @param[in] maxDelay maximum offset time supported.
<> 140:97feb9bacc10 4863 * @param[in] blockSize number of samples that will be processed per block.
<> 140:97feb9bacc10 4864 * @return none
<> 140:97feb9bacc10 4865 */
<> 140:97feb9bacc10 4866
<> 140:97feb9bacc10 4867 void arm_fir_sparse_init_q15(
<> 140:97feb9bacc10 4868 arm_fir_sparse_instance_q15 * S,
<> 140:97feb9bacc10 4869 uint16_t numTaps,
<> 140:97feb9bacc10 4870 q15_t * pCoeffs,
<> 140:97feb9bacc10 4871 q15_t * pState,
<> 140:97feb9bacc10 4872 int32_t * pTapDelay,
<> 140:97feb9bacc10 4873 uint16_t maxDelay,
<> 140:97feb9bacc10 4874 uint32_t blockSize);
<> 140:97feb9bacc10 4875
<> 140:97feb9bacc10 4876 /**
<> 140:97feb9bacc10 4877 * @brief Processing function for the Q7 sparse FIR filter.
<> 140:97feb9bacc10 4878 * @param[in] *S points to an instance of the Q7 sparse FIR structure.
<> 140:97feb9bacc10 4879 * @param[in] *pSrc points to the block of input data.
<> 140:97feb9bacc10 4880 * @param[out] *pDst points to the block of output data
<> 140:97feb9bacc10 4881 * @param[in] *pScratchIn points to a temporary buffer of size blockSize.
<> 140:97feb9bacc10 4882 * @param[in] *pScratchOut points to a temporary buffer of size blockSize.
<> 140:97feb9bacc10 4883 * @param[in] blockSize number of input samples to process per call.
<> 140:97feb9bacc10 4884 * @return none.
<> 140:97feb9bacc10 4885 */
<> 140:97feb9bacc10 4886
<> 140:97feb9bacc10 4887 void arm_fir_sparse_q7(
<> 140:97feb9bacc10 4888 arm_fir_sparse_instance_q7 * S,
<> 140:97feb9bacc10 4889 q7_t * pSrc,
<> 140:97feb9bacc10 4890 q7_t * pDst,
<> 140:97feb9bacc10 4891 q7_t * pScratchIn,
<> 140:97feb9bacc10 4892 q31_t * pScratchOut,
<> 140:97feb9bacc10 4893 uint32_t blockSize);
<> 140:97feb9bacc10 4894
<> 140:97feb9bacc10 4895 /**
<> 140:97feb9bacc10 4896 * @brief Initialization function for the Q7 sparse FIR filter.
<> 140:97feb9bacc10 4897 * @param[in,out] *S points to an instance of the Q7 sparse FIR structure.
<> 140:97feb9bacc10 4898 * @param[in] numTaps number of nonzero coefficients in the filter.
<> 140:97feb9bacc10 4899 * @param[in] *pCoeffs points to the array of filter coefficients.
<> 140:97feb9bacc10 4900 * @param[in] *pState points to the state buffer.
<> 140:97feb9bacc10 4901 * @param[in] *pTapDelay points to the array of offset times.
<> 140:97feb9bacc10 4902 * @param[in] maxDelay maximum offset time supported.
<> 140:97feb9bacc10 4903 * @param[in] blockSize number of samples that will be processed per block.
<> 140:97feb9bacc10 4904 * @return none
<> 140:97feb9bacc10 4905 */
<> 140:97feb9bacc10 4906
<> 140:97feb9bacc10 4907 void arm_fir_sparse_init_q7(
<> 140:97feb9bacc10 4908 arm_fir_sparse_instance_q7 * S,
<> 140:97feb9bacc10 4909 uint16_t numTaps,
<> 140:97feb9bacc10 4910 q7_t * pCoeffs,
<> 140:97feb9bacc10 4911 q7_t * pState,
<> 140:97feb9bacc10 4912 int32_t * pTapDelay,
<> 140:97feb9bacc10 4913 uint16_t maxDelay,
<> 140:97feb9bacc10 4914 uint32_t blockSize);
<> 140:97feb9bacc10 4915
<> 140:97feb9bacc10 4916
<> 140:97feb9bacc10 4917 /*
<> 140:97feb9bacc10 4918 * @brief Floating-point sin_cos function.
<> 140:97feb9bacc10 4919 * @param[in] theta input value in degrees
<> 140:97feb9bacc10 4920 * @param[out] *pSinVal points to the processed sine output.
<> 140:97feb9bacc10 4921 * @param[out] *pCosVal points to the processed cos output.
<> 140:97feb9bacc10 4922 * @return none.
<> 140:97feb9bacc10 4923 */
<> 140:97feb9bacc10 4924
<> 140:97feb9bacc10 4925 void arm_sin_cos_f32(
<> 140:97feb9bacc10 4926 float32_t theta,
<> 140:97feb9bacc10 4927 float32_t * pSinVal,
<> 140:97feb9bacc10 4928 float32_t * pCcosVal);
<> 140:97feb9bacc10 4929
<> 140:97feb9bacc10 4930 /*
<> 140:97feb9bacc10 4931 * @brief Q31 sin_cos function.
<> 140:97feb9bacc10 4932 * @param[in] theta scaled input value in degrees
<> 140:97feb9bacc10 4933 * @param[out] *pSinVal points to the processed sine output.
<> 140:97feb9bacc10 4934 * @param[out] *pCosVal points to the processed cosine output.
<> 140:97feb9bacc10 4935 * @return none.
<> 140:97feb9bacc10 4936 */
<> 140:97feb9bacc10 4937
<> 140:97feb9bacc10 4938 void arm_sin_cos_q31(
<> 140:97feb9bacc10 4939 q31_t theta,
<> 140:97feb9bacc10 4940 q31_t * pSinVal,
<> 140:97feb9bacc10 4941 q31_t * pCosVal);
<> 140:97feb9bacc10 4942
<> 140:97feb9bacc10 4943
<> 140:97feb9bacc10 4944 /**
<> 140:97feb9bacc10 4945 * @brief Floating-point complex conjugate.
<> 140:97feb9bacc10 4946 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 4947 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 4948 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 4949 * @return none.
<> 140:97feb9bacc10 4950 */
<> 140:97feb9bacc10 4951
<> 140:97feb9bacc10 4952 void arm_cmplx_conj_f32(
<> 140:97feb9bacc10 4953 float32_t * pSrc,
<> 140:97feb9bacc10 4954 float32_t * pDst,
<> 140:97feb9bacc10 4955 uint32_t numSamples);
<> 140:97feb9bacc10 4956
<> 140:97feb9bacc10 4957 /**
<> 140:97feb9bacc10 4958 * @brief Q31 complex conjugate.
<> 140:97feb9bacc10 4959 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 4960 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 4961 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 4962 * @return none.
<> 140:97feb9bacc10 4963 */
<> 140:97feb9bacc10 4964
<> 140:97feb9bacc10 4965 void arm_cmplx_conj_q31(
<> 140:97feb9bacc10 4966 q31_t * pSrc,
<> 140:97feb9bacc10 4967 q31_t * pDst,
<> 140:97feb9bacc10 4968 uint32_t numSamples);
<> 140:97feb9bacc10 4969
<> 140:97feb9bacc10 4970 /**
<> 140:97feb9bacc10 4971 * @brief Q15 complex conjugate.
<> 140:97feb9bacc10 4972 * @param[in] *pSrc points to the input vector
<> 140:97feb9bacc10 4973 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 4974 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 4975 * @return none.
<> 140:97feb9bacc10 4976 */
<> 140:97feb9bacc10 4977
<> 140:97feb9bacc10 4978 void arm_cmplx_conj_q15(
<> 140:97feb9bacc10 4979 q15_t * pSrc,
<> 140:97feb9bacc10 4980 q15_t * pDst,
<> 140:97feb9bacc10 4981 uint32_t numSamples);
<> 140:97feb9bacc10 4982
<> 140:97feb9bacc10 4983
<> 140:97feb9bacc10 4984
<> 140:97feb9bacc10 4985 /**
<> 140:97feb9bacc10 4986 * @brief Floating-point complex magnitude squared
<> 140:97feb9bacc10 4987 * @param[in] *pSrc points to the complex input vector
<> 140:97feb9bacc10 4988 * @param[out] *pDst points to the real output vector
<> 140:97feb9bacc10 4989 * @param[in] numSamples number of complex samples in the input vector
<> 140:97feb9bacc10 4990 * @return none.
<> 140:97feb9bacc10 4991 */
<> 140:97feb9bacc10 4992
<> 140:97feb9bacc10 4993 void arm_cmplx_mag_squared_f32(
<> 140:97feb9bacc10 4994 float32_t * pSrc,
<> 140:97feb9bacc10 4995 float32_t * pDst,
<> 140:97feb9bacc10 4996 uint32_t numSamples);
<> 140:97feb9bacc10 4997
<> 140:97feb9bacc10 4998 /**
<> 140:97feb9bacc10 4999 * @brief Q31 complex magnitude squared
<> 140:97feb9bacc10 5000 * @param[in] *pSrc points to the complex input vector
<> 140:97feb9bacc10 5001 * @param[out] *pDst points to the real output vector
<> 140:97feb9bacc10 5002 * @param[in] numSamples number of complex samples in the input vector
<> 140:97feb9bacc10 5003 * @return none.
<> 140:97feb9bacc10 5004 */
<> 140:97feb9bacc10 5005
<> 140:97feb9bacc10 5006 void arm_cmplx_mag_squared_q31(
<> 140:97feb9bacc10 5007 q31_t * pSrc,
<> 140:97feb9bacc10 5008 q31_t * pDst,
<> 140:97feb9bacc10 5009 uint32_t numSamples);
<> 140:97feb9bacc10 5010
<> 140:97feb9bacc10 5011 /**
<> 140:97feb9bacc10 5012 * @brief Q15 complex magnitude squared
<> 140:97feb9bacc10 5013 * @param[in] *pSrc points to the complex input vector
<> 140:97feb9bacc10 5014 * @param[out] *pDst points to the real output vector
<> 140:97feb9bacc10 5015 * @param[in] numSamples number of complex samples in the input vector
<> 140:97feb9bacc10 5016 * @return none.
<> 140:97feb9bacc10 5017 */
<> 140:97feb9bacc10 5018
<> 140:97feb9bacc10 5019 void arm_cmplx_mag_squared_q15(
<> 140:97feb9bacc10 5020 q15_t * pSrc,
<> 140:97feb9bacc10 5021 q15_t * pDst,
<> 140:97feb9bacc10 5022 uint32_t numSamples);
<> 140:97feb9bacc10 5023
<> 140:97feb9bacc10 5024
<> 140:97feb9bacc10 5025 /**
<> 140:97feb9bacc10 5026 * @ingroup groupController
<> 140:97feb9bacc10 5027 */
<> 140:97feb9bacc10 5028
<> 140:97feb9bacc10 5029 /**
<> 140:97feb9bacc10 5030 * @defgroup PID PID Motor Control
<> 140:97feb9bacc10 5031 *
<> 140:97feb9bacc10 5032 * A Proportional Integral Derivative (PID) controller is a generic feedback control
<> 140:97feb9bacc10 5033 * loop mechanism widely used in industrial control systems.
<> 140:97feb9bacc10 5034 * A PID controller is the most commonly used type of feedback controller.
<> 140:97feb9bacc10 5035 *
<> 140:97feb9bacc10 5036 * This set of functions implements (PID) controllers
<> 140:97feb9bacc10 5037 * for Q15, Q31, and floating-point data types. The functions operate on a single sample
<> 140:97feb9bacc10 5038 * of data and each call to the function returns a single processed value.
<> 140:97feb9bacc10 5039 * <code>S</code> points to an instance of the PID control data structure. <code>in</code>
<> 140:97feb9bacc10 5040 * is the input sample value. The functions return the output value.
<> 140:97feb9bacc10 5041 *
<> 140:97feb9bacc10 5042 * \par Algorithm:
<> 140:97feb9bacc10 5043 * <pre>
<> 140:97feb9bacc10 5044 * y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2]
<> 140:97feb9bacc10 5045 * A0 = Kp + Ki + Kd
<> 140:97feb9bacc10 5046 * A1 = (-Kp ) - (2 * Kd )
<> 140:97feb9bacc10 5047 * A2 = Kd </pre>
<> 140:97feb9bacc10 5048 *
<> 140:97feb9bacc10 5049 * \par
<> 140:97feb9bacc10 5050 * where \c Kp is proportional constant, \c Ki is Integral constant and \c Kd is Derivative constant
<> 140:97feb9bacc10 5051 *
<> 140:97feb9bacc10 5052 * \par
<> 140:97feb9bacc10 5053 * \image html PID.gif "Proportional Integral Derivative Controller"
<> 140:97feb9bacc10 5054 *
<> 140:97feb9bacc10 5055 * \par
<> 140:97feb9bacc10 5056 * The PID controller calculates an "error" value as the difference between
<> 140:97feb9bacc10 5057 * the measured output and the reference input.
<> 140:97feb9bacc10 5058 * The controller attempts to minimize the error by adjusting the process control inputs.
<> 140:97feb9bacc10 5059 * The proportional value determines the reaction to the current error,
<> 140:97feb9bacc10 5060 * the integral value determines the reaction based on the sum of recent errors,
<> 140:97feb9bacc10 5061 * and the derivative value determines the reaction based on the rate at which the error has been changing.
<> 140:97feb9bacc10 5062 *
<> 140:97feb9bacc10 5063 * \par Instance Structure
<> 140:97feb9bacc10 5064 * The Gains A0, A1, A2 and state variables for a PID controller are stored together in an instance data structure.
<> 140:97feb9bacc10 5065 * A separate instance structure must be defined for each PID Controller.
<> 140:97feb9bacc10 5066 * There are separate instance structure declarations for each of the 3 supported data types.
<> 140:97feb9bacc10 5067 *
<> 140:97feb9bacc10 5068 * \par Reset Functions
<> 140:97feb9bacc10 5069 * There is also an associated reset function for each data type which clears the state array.
<> 140:97feb9bacc10 5070 *
<> 140:97feb9bacc10 5071 * \par Initialization Functions
<> 140:97feb9bacc10 5072 * There is also an associated initialization function for each data type.
<> 140:97feb9bacc10 5073 * The initialization function performs the following operations:
<> 140:97feb9bacc10 5074 * - Initializes the Gains A0, A1, A2 from Kp,Ki, Kd gains.
<> 140:97feb9bacc10 5075 * - Zeros out the values in the state buffer.
<> 140:97feb9bacc10 5076 *
<> 140:97feb9bacc10 5077 * \par
<> 140:97feb9bacc10 5078 * Instance structure cannot be placed into a const data section and it is recommended to use the initialization function.
<> 140:97feb9bacc10 5079 *
<> 140:97feb9bacc10 5080 * \par Fixed-Point Behavior
<> 140:97feb9bacc10 5081 * Care must be taken when using the fixed-point versions of the PID Controller functions.
<> 140:97feb9bacc10 5082 * In particular, the overflow and saturation behavior of the accumulator used in each function must be considered.
<> 140:97feb9bacc10 5083 * Refer to the function specific documentation below for usage guidelines.
<> 140:97feb9bacc10 5084 */
<> 140:97feb9bacc10 5085
<> 140:97feb9bacc10 5086 /**
<> 140:97feb9bacc10 5087 * @addtogroup PID
<> 140:97feb9bacc10 5088 * @{
<> 140:97feb9bacc10 5089 */
<> 140:97feb9bacc10 5090
<> 140:97feb9bacc10 5091 /**
<> 140:97feb9bacc10 5092 * @brief Process function for the floating-point PID Control.
<> 140:97feb9bacc10 5093 * @param[in,out] *S is an instance of the floating-point PID Control structure
<> 140:97feb9bacc10 5094 * @param[in] in input sample to process
<> 140:97feb9bacc10 5095 * @return out processed output sample.
<> 140:97feb9bacc10 5096 */
<> 140:97feb9bacc10 5097
<> 140:97feb9bacc10 5098
<> 140:97feb9bacc10 5099 static __INLINE float32_t arm_pid_f32(
<> 140:97feb9bacc10 5100 arm_pid_instance_f32 * S,
<> 140:97feb9bacc10 5101 float32_t in)
<> 140:97feb9bacc10 5102 {
<> 140:97feb9bacc10 5103 float32_t out;
<> 140:97feb9bacc10 5104
<> 140:97feb9bacc10 5105 /* y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] */
<> 140:97feb9bacc10 5106 out = (S->A0 * in) +
<> 140:97feb9bacc10 5107 (S->A1 * S->state[0]) + (S->A2 * S->state[1]) + (S->state[2]);
<> 140:97feb9bacc10 5108
<> 140:97feb9bacc10 5109 /* Update state */
<> 140:97feb9bacc10 5110 S->state[1] = S->state[0];
<> 140:97feb9bacc10 5111 S->state[0] = in;
<> 140:97feb9bacc10 5112 S->state[2] = out;
<> 140:97feb9bacc10 5113
<> 140:97feb9bacc10 5114 /* return to application */
<> 140:97feb9bacc10 5115 return (out);
<> 140:97feb9bacc10 5116
<> 140:97feb9bacc10 5117 }
<> 140:97feb9bacc10 5118
<> 140:97feb9bacc10 5119 /**
<> 140:97feb9bacc10 5120 * @brief Process function for the Q31 PID Control.
<> 140:97feb9bacc10 5121 * @param[in,out] *S points to an instance of the Q31 PID Control structure
<> 140:97feb9bacc10 5122 * @param[in] in input sample to process
<> 140:97feb9bacc10 5123 * @return out processed output sample.
<> 140:97feb9bacc10 5124 *
<> 140:97feb9bacc10 5125 * <b>Scaling and Overflow Behavior:</b>
<> 140:97feb9bacc10 5126 * \par
<> 140:97feb9bacc10 5127 * The function is implemented using an internal 64-bit accumulator.
<> 140:97feb9bacc10 5128 * The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit.
<> 140:97feb9bacc10 5129 * Thus, if the accumulator result overflows it wraps around rather than clip.
<> 140:97feb9bacc10 5130 * In order to avoid overflows completely the input signal must be scaled down by 2 bits as there are four additions.
<> 140:97feb9bacc10 5131 * After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and then saturated to 1.31 format.
<> 140:97feb9bacc10 5132 */
<> 140:97feb9bacc10 5133
<> 140:97feb9bacc10 5134 static __INLINE q31_t arm_pid_q31(
<> 140:97feb9bacc10 5135 arm_pid_instance_q31 * S,
<> 140:97feb9bacc10 5136 q31_t in)
<> 140:97feb9bacc10 5137 {
<> 140:97feb9bacc10 5138 q63_t acc;
<> 140:97feb9bacc10 5139 q31_t out;
<> 140:97feb9bacc10 5140
<> 140:97feb9bacc10 5141 /* acc = A0 * x[n] */
<> 140:97feb9bacc10 5142 acc = (q63_t) S->A0 * in;
<> 140:97feb9bacc10 5143
<> 140:97feb9bacc10 5144 /* acc += A1 * x[n-1] */
<> 140:97feb9bacc10 5145 acc += (q63_t) S->A1 * S->state[0];
<> 140:97feb9bacc10 5146
<> 140:97feb9bacc10 5147 /* acc += A2 * x[n-2] */
<> 140:97feb9bacc10 5148 acc += (q63_t) S->A2 * S->state[1];
<> 140:97feb9bacc10 5149
<> 140:97feb9bacc10 5150 /* convert output to 1.31 format to add y[n-1] */
<> 140:97feb9bacc10 5151 out = (q31_t) (acc >> 31u);
<> 140:97feb9bacc10 5152
<> 140:97feb9bacc10 5153 /* out += y[n-1] */
<> 140:97feb9bacc10 5154 out += S->state[2];
<> 140:97feb9bacc10 5155
<> 140:97feb9bacc10 5156 /* Update state */
<> 140:97feb9bacc10 5157 S->state[1] = S->state[0];
<> 140:97feb9bacc10 5158 S->state[0] = in;
<> 140:97feb9bacc10 5159 S->state[2] = out;
<> 140:97feb9bacc10 5160
<> 140:97feb9bacc10 5161 /* return to application */
<> 140:97feb9bacc10 5162 return (out);
<> 140:97feb9bacc10 5163
<> 140:97feb9bacc10 5164 }
<> 140:97feb9bacc10 5165
<> 140:97feb9bacc10 5166 /**
<> 140:97feb9bacc10 5167 * @brief Process function for the Q15 PID Control.
<> 140:97feb9bacc10 5168 * @param[in,out] *S points to an instance of the Q15 PID Control structure
<> 140:97feb9bacc10 5169 * @param[in] in input sample to process
<> 140:97feb9bacc10 5170 * @return out processed output sample.
<> 140:97feb9bacc10 5171 *
<> 140:97feb9bacc10 5172 * <b>Scaling and Overflow Behavior:</b>
<> 140:97feb9bacc10 5173 * \par
<> 140:97feb9bacc10 5174 * The function is implemented using a 64-bit internal accumulator.
<> 140:97feb9bacc10 5175 * Both Gains and state variables are represented in 1.15 format and multiplications yield a 2.30 result.
<> 140:97feb9bacc10 5176 * The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format.
<> 140:97feb9bacc10 5177 * There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved.
<> 140:97feb9bacc10 5178 * After all additions have been performed, the accumulator is truncated to 34.15 format by discarding low 15 bits.
<> 140:97feb9bacc10 5179 * Lastly, the accumulator is saturated to yield a result in 1.15 format.
<> 140:97feb9bacc10 5180 */
<> 140:97feb9bacc10 5181
<> 140:97feb9bacc10 5182 static __INLINE q15_t arm_pid_q15(
<> 140:97feb9bacc10 5183 arm_pid_instance_q15 * S,
<> 140:97feb9bacc10 5184 q15_t in)
<> 140:97feb9bacc10 5185 {
<> 140:97feb9bacc10 5186 q63_t acc;
<> 140:97feb9bacc10 5187 q15_t out;
<> 140:97feb9bacc10 5188
<> 140:97feb9bacc10 5189 #ifndef ARM_MATH_CM0_FAMILY
<> 140:97feb9bacc10 5190 __SIMD32_TYPE *vstate;
<> 140:97feb9bacc10 5191
<> 140:97feb9bacc10 5192 /* Implementation of PID controller */
<> 140:97feb9bacc10 5193
<> 140:97feb9bacc10 5194 /* acc = A0 * x[n] */
<> 140:97feb9bacc10 5195 acc = (q31_t) __SMUAD(S->A0, in);
<> 140:97feb9bacc10 5196
<> 140:97feb9bacc10 5197 /* acc += A1 * x[n-1] + A2 * x[n-2] */
<> 140:97feb9bacc10 5198 vstate = __SIMD32_CONST(S->state);
<> 140:97feb9bacc10 5199 acc = __SMLALD(S->A1, (q31_t) *vstate, acc);
<> 140:97feb9bacc10 5200
<> 140:97feb9bacc10 5201 #else
<> 140:97feb9bacc10 5202 /* acc = A0 * x[n] */
<> 140:97feb9bacc10 5203 acc = ((q31_t) S->A0) * in;
<> 140:97feb9bacc10 5204
<> 140:97feb9bacc10 5205 /* acc += A1 * x[n-1] + A2 * x[n-2] */
<> 140:97feb9bacc10 5206 acc += (q31_t) S->A1 * S->state[0];
<> 140:97feb9bacc10 5207 acc += (q31_t) S->A2 * S->state[1];
<> 140:97feb9bacc10 5208
<> 140:97feb9bacc10 5209 #endif
<> 140:97feb9bacc10 5210
<> 140:97feb9bacc10 5211 /* acc += y[n-1] */
<> 140:97feb9bacc10 5212 acc += (q31_t) S->state[2] << 15;
<> 140:97feb9bacc10 5213
<> 140:97feb9bacc10 5214 /* saturate the output */
<> 140:97feb9bacc10 5215 out = (q15_t) (__SSAT((acc >> 15), 16));
<> 140:97feb9bacc10 5216
<> 140:97feb9bacc10 5217 /* Update state */
<> 140:97feb9bacc10 5218 S->state[1] = S->state[0];
<> 140:97feb9bacc10 5219 S->state[0] = in;
<> 140:97feb9bacc10 5220 S->state[2] = out;
<> 140:97feb9bacc10 5221
<> 140:97feb9bacc10 5222 /* return to application */
<> 140:97feb9bacc10 5223 return (out);
<> 140:97feb9bacc10 5224
<> 140:97feb9bacc10 5225 }
<> 140:97feb9bacc10 5226
<> 140:97feb9bacc10 5227 /**
<> 140:97feb9bacc10 5228 * @} end of PID group
<> 140:97feb9bacc10 5229 */
<> 140:97feb9bacc10 5230
<> 140:97feb9bacc10 5231
<> 140:97feb9bacc10 5232 /**
<> 140:97feb9bacc10 5233 * @brief Floating-point matrix inverse.
<> 140:97feb9bacc10 5234 * @param[in] *src points to the instance of the input floating-point matrix structure.
<> 140:97feb9bacc10 5235 * @param[out] *dst points to the instance of the output floating-point matrix structure.
<> 140:97feb9bacc10 5236 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
<> 140:97feb9bacc10 5237 * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
<> 140:97feb9bacc10 5238 */
<> 140:97feb9bacc10 5239
<> 140:97feb9bacc10 5240 arm_status arm_mat_inverse_f32(
<> 140:97feb9bacc10 5241 const arm_matrix_instance_f32 * src,
<> 140:97feb9bacc10 5242 arm_matrix_instance_f32 * dst);
<> 140:97feb9bacc10 5243
<> 140:97feb9bacc10 5244
<> 140:97feb9bacc10 5245 /**
<> 140:97feb9bacc10 5246 * @brief Floating-point matrix inverse.
<> 140:97feb9bacc10 5247 * @param[in] *src points to the instance of the input floating-point matrix structure.
<> 140:97feb9bacc10 5248 * @param[out] *dst points to the instance of the output floating-point matrix structure.
<> 140:97feb9bacc10 5249 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
<> 140:97feb9bacc10 5250 * If the input matrix is singular (does not have an inverse), then the algorithm terminates and returns error status ARM_MATH_SINGULAR.
<> 140:97feb9bacc10 5251 */
<> 140:97feb9bacc10 5252
<> 140:97feb9bacc10 5253 arm_status arm_mat_inverse_f64(
<> 140:97feb9bacc10 5254 const arm_matrix_instance_f64 * src,
<> 140:97feb9bacc10 5255 arm_matrix_instance_f64 * dst);
<> 140:97feb9bacc10 5256
<> 140:97feb9bacc10 5257
<> 140:97feb9bacc10 5258
<> 140:97feb9bacc10 5259 /**
<> 140:97feb9bacc10 5260 * @ingroup groupController
<> 140:97feb9bacc10 5261 */
<> 140:97feb9bacc10 5262
<> 140:97feb9bacc10 5263
<> 140:97feb9bacc10 5264 /**
<> 140:97feb9bacc10 5265 * @defgroup clarke Vector Clarke Transform
<> 140:97feb9bacc10 5266 * Forward Clarke transform converts the instantaneous stator phases into a two-coordinate time invariant vector.
<> 140:97feb9bacc10 5267 * Generally the Clarke transform uses three-phase currents <code>Ia, Ib and Ic</code> to calculate currents
<> 140:97feb9bacc10 5268 * in the two-phase orthogonal stator axis <code>Ialpha</code> and <code>Ibeta</code>.
<> 140:97feb9bacc10 5269 * When <code>Ialpha</code> is superposed with <code>Ia</code> as shown in the figure below
<> 140:97feb9bacc10 5270 * \image html clarke.gif Stator current space vector and its components in (a,b).
<> 140:97feb9bacc10 5271 * and <code>Ia + Ib + Ic = 0</code>, in this condition <code>Ialpha</code> and <code>Ibeta</code>
<> 140:97feb9bacc10 5272 * can be calculated using only <code>Ia</code> and <code>Ib</code>.
<> 140:97feb9bacc10 5273 *
<> 140:97feb9bacc10 5274 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 140:97feb9bacc10 5275 * The library provides separate functions for Q31 and floating-point data types.
<> 140:97feb9bacc10 5276 * \par Algorithm
<> 140:97feb9bacc10 5277 * \image html clarkeFormula.gif
<> 140:97feb9bacc10 5278 * where <code>Ia</code> and <code>Ib</code> are the instantaneous stator phases and
<> 140:97feb9bacc10 5279 * <code>pIalpha</code> and <code>pIbeta</code> are the two coordinates of time invariant vector.
<> 140:97feb9bacc10 5280 * \par Fixed-Point Behavior
<> 140:97feb9bacc10 5281 * Care must be taken when using the Q31 version of the Clarke transform.
<> 140:97feb9bacc10 5282 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 140:97feb9bacc10 5283 * Refer to the function specific documentation below for usage guidelines.
<> 140:97feb9bacc10 5284 */
<> 140:97feb9bacc10 5285
<> 140:97feb9bacc10 5286 /**
<> 140:97feb9bacc10 5287 * @addtogroup clarke
<> 140:97feb9bacc10 5288 * @{
<> 140:97feb9bacc10 5289 */
<> 140:97feb9bacc10 5290
<> 140:97feb9bacc10 5291 /**
<> 140:97feb9bacc10 5292 *
<> 140:97feb9bacc10 5293 * @brief Floating-point Clarke transform
<> 140:97feb9bacc10 5294 * @param[in] Ia input three-phase coordinate <code>a</code>
<> 140:97feb9bacc10 5295 * @param[in] Ib input three-phase coordinate <code>b</code>
<> 140:97feb9bacc10 5296 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 140:97feb9bacc10 5297 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 140:97feb9bacc10 5298 * @return none.
<> 140:97feb9bacc10 5299 */
<> 140:97feb9bacc10 5300
<> 140:97feb9bacc10 5301 static __INLINE void arm_clarke_f32(
<> 140:97feb9bacc10 5302 float32_t Ia,
<> 140:97feb9bacc10 5303 float32_t Ib,
<> 140:97feb9bacc10 5304 float32_t * pIalpha,
<> 140:97feb9bacc10 5305 float32_t * pIbeta)
<> 140:97feb9bacc10 5306 {
<> 140:97feb9bacc10 5307 /* Calculate pIalpha using the equation, pIalpha = Ia */
<> 140:97feb9bacc10 5308 *pIalpha = Ia;
<> 140:97feb9bacc10 5309
<> 140:97feb9bacc10 5310 /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */
<> 140:97feb9bacc10 5311 *pIbeta =
<> 140:97feb9bacc10 5312 ((float32_t) 0.57735026919 * Ia + (float32_t) 1.15470053838 * Ib);
<> 140:97feb9bacc10 5313
<> 140:97feb9bacc10 5314 }
<> 140:97feb9bacc10 5315
<> 140:97feb9bacc10 5316 /**
<> 140:97feb9bacc10 5317 * @brief Clarke transform for Q31 version
<> 140:97feb9bacc10 5318 * @param[in] Ia input three-phase coordinate <code>a</code>
<> 140:97feb9bacc10 5319 * @param[in] Ib input three-phase coordinate <code>b</code>
<> 140:97feb9bacc10 5320 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 140:97feb9bacc10 5321 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 140:97feb9bacc10 5322 * @return none.
<> 140:97feb9bacc10 5323 *
<> 140:97feb9bacc10 5324 * <b>Scaling and Overflow Behavior:</b>
<> 140:97feb9bacc10 5325 * \par
<> 140:97feb9bacc10 5326 * The function is implemented using an internal 32-bit accumulator.
<> 140:97feb9bacc10 5327 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 140:97feb9bacc10 5328 * There is saturation on the addition, hence there is no risk of overflow.
<> 140:97feb9bacc10 5329 */
<> 140:97feb9bacc10 5330
<> 140:97feb9bacc10 5331 static __INLINE void arm_clarke_q31(
<> 140:97feb9bacc10 5332 q31_t Ia,
<> 140:97feb9bacc10 5333 q31_t Ib,
<> 140:97feb9bacc10 5334 q31_t * pIalpha,
<> 140:97feb9bacc10 5335 q31_t * pIbeta)
<> 140:97feb9bacc10 5336 {
<> 140:97feb9bacc10 5337 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 140:97feb9bacc10 5338
<> 140:97feb9bacc10 5339 /* Calculating pIalpha from Ia by equation pIalpha = Ia */
<> 140:97feb9bacc10 5340 *pIalpha = Ia;
<> 140:97feb9bacc10 5341
<> 140:97feb9bacc10 5342 /* Intermediate product is calculated by (1/(sqrt(3)) * Ia) */
<> 140:97feb9bacc10 5343 product1 = (q31_t) (((q63_t) Ia * 0x24F34E8B) >> 30);
<> 140:97feb9bacc10 5344
<> 140:97feb9bacc10 5345 /* Intermediate product is calculated by (2/sqrt(3) * Ib) */
<> 140:97feb9bacc10 5346 product2 = (q31_t) (((q63_t) Ib * 0x49E69D16) >> 30);
<> 140:97feb9bacc10 5347
<> 140:97feb9bacc10 5348 /* pIbeta is calculated by adding the intermediate products */
<> 140:97feb9bacc10 5349 *pIbeta = __QADD(product1, product2);
<> 140:97feb9bacc10 5350 }
<> 140:97feb9bacc10 5351
<> 140:97feb9bacc10 5352 /**
<> 140:97feb9bacc10 5353 * @} end of clarke group
<> 140:97feb9bacc10 5354 */
<> 140:97feb9bacc10 5355
<> 140:97feb9bacc10 5356 /**
<> 140:97feb9bacc10 5357 * @brief Converts the elements of the Q7 vector to Q31 vector.
<> 140:97feb9bacc10 5358 * @param[in] *pSrc input pointer
<> 140:97feb9bacc10 5359 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 5360 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 5361 * @return none.
<> 140:97feb9bacc10 5362 */
<> 140:97feb9bacc10 5363 void arm_q7_to_q31(
<> 140:97feb9bacc10 5364 q7_t * pSrc,
<> 140:97feb9bacc10 5365 q31_t * pDst,
<> 140:97feb9bacc10 5366 uint32_t blockSize);
<> 140:97feb9bacc10 5367
<> 140:97feb9bacc10 5368
<> 140:97feb9bacc10 5369
<> 140:97feb9bacc10 5370
<> 140:97feb9bacc10 5371 /**
<> 140:97feb9bacc10 5372 * @ingroup groupController
<> 140:97feb9bacc10 5373 */
<> 140:97feb9bacc10 5374
<> 140:97feb9bacc10 5375 /**
<> 140:97feb9bacc10 5376 * @defgroup inv_clarke Vector Inverse Clarke Transform
<> 140:97feb9bacc10 5377 * Inverse Clarke transform converts the two-coordinate time invariant vector into instantaneous stator phases.
<> 140:97feb9bacc10 5378 *
<> 140:97feb9bacc10 5379 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 140:97feb9bacc10 5380 * The library provides separate functions for Q31 and floating-point data types.
<> 140:97feb9bacc10 5381 * \par Algorithm
<> 140:97feb9bacc10 5382 * \image html clarkeInvFormula.gif
<> 140:97feb9bacc10 5383 * where <code>pIa</code> and <code>pIb</code> are the instantaneous stator phases and
<> 140:97feb9bacc10 5384 * <code>Ialpha</code> and <code>Ibeta</code> are the two coordinates of time invariant vector.
<> 140:97feb9bacc10 5385 * \par Fixed-Point Behavior
<> 140:97feb9bacc10 5386 * Care must be taken when using the Q31 version of the Clarke transform.
<> 140:97feb9bacc10 5387 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 140:97feb9bacc10 5388 * Refer to the function specific documentation below for usage guidelines.
<> 140:97feb9bacc10 5389 */
<> 140:97feb9bacc10 5390
<> 140:97feb9bacc10 5391 /**
<> 140:97feb9bacc10 5392 * @addtogroup inv_clarke
<> 140:97feb9bacc10 5393 * @{
<> 140:97feb9bacc10 5394 */
<> 140:97feb9bacc10 5395
<> 140:97feb9bacc10 5396 /**
<> 140:97feb9bacc10 5397 * @brief Floating-point Inverse Clarke transform
<> 140:97feb9bacc10 5398 * @param[in] Ialpha input two-phase orthogonal vector axis alpha
<> 140:97feb9bacc10 5399 * @param[in] Ibeta input two-phase orthogonal vector axis beta
<> 140:97feb9bacc10 5400 * @param[out] *pIa points to output three-phase coordinate <code>a</code>
<> 140:97feb9bacc10 5401 * @param[out] *pIb points to output three-phase coordinate <code>b</code>
<> 140:97feb9bacc10 5402 * @return none.
<> 140:97feb9bacc10 5403 */
<> 140:97feb9bacc10 5404
<> 140:97feb9bacc10 5405
<> 140:97feb9bacc10 5406 static __INLINE void arm_inv_clarke_f32(
<> 140:97feb9bacc10 5407 float32_t Ialpha,
<> 140:97feb9bacc10 5408 float32_t Ibeta,
<> 140:97feb9bacc10 5409 float32_t * pIa,
<> 140:97feb9bacc10 5410 float32_t * pIb)
<> 140:97feb9bacc10 5411 {
<> 140:97feb9bacc10 5412 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
<> 140:97feb9bacc10 5413 *pIa = Ialpha;
<> 140:97feb9bacc10 5414
<> 140:97feb9bacc10 5415 /* Calculating pIb from Ialpha and Ibeta by equation pIb = -(1/2) * Ialpha + (sqrt(3)/2) * Ibeta */
<> 140:97feb9bacc10 5416 *pIb = -0.5 * Ialpha + (float32_t) 0.8660254039 *Ibeta;
<> 140:97feb9bacc10 5417
<> 140:97feb9bacc10 5418 }
<> 140:97feb9bacc10 5419
<> 140:97feb9bacc10 5420 /**
<> 140:97feb9bacc10 5421 * @brief Inverse Clarke transform for Q31 version
<> 140:97feb9bacc10 5422 * @param[in] Ialpha input two-phase orthogonal vector axis alpha
<> 140:97feb9bacc10 5423 * @param[in] Ibeta input two-phase orthogonal vector axis beta
<> 140:97feb9bacc10 5424 * @param[out] *pIa points to output three-phase coordinate <code>a</code>
<> 140:97feb9bacc10 5425 * @param[out] *pIb points to output three-phase coordinate <code>b</code>
<> 140:97feb9bacc10 5426 * @return none.
<> 140:97feb9bacc10 5427 *
<> 140:97feb9bacc10 5428 * <b>Scaling and Overflow Behavior:</b>
<> 140:97feb9bacc10 5429 * \par
<> 140:97feb9bacc10 5430 * The function is implemented using an internal 32-bit accumulator.
<> 140:97feb9bacc10 5431 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 140:97feb9bacc10 5432 * There is saturation on the subtraction, hence there is no risk of overflow.
<> 140:97feb9bacc10 5433 */
<> 140:97feb9bacc10 5434
<> 140:97feb9bacc10 5435 static __INLINE void arm_inv_clarke_q31(
<> 140:97feb9bacc10 5436 q31_t Ialpha,
<> 140:97feb9bacc10 5437 q31_t Ibeta,
<> 140:97feb9bacc10 5438 q31_t * pIa,
<> 140:97feb9bacc10 5439 q31_t * pIb)
<> 140:97feb9bacc10 5440 {
<> 140:97feb9bacc10 5441 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 140:97feb9bacc10 5442
<> 140:97feb9bacc10 5443 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
<> 140:97feb9bacc10 5444 *pIa = Ialpha;
<> 140:97feb9bacc10 5445
<> 140:97feb9bacc10 5446 /* Intermediate product is calculated by (1/(2*sqrt(3)) * Ia) */
<> 140:97feb9bacc10 5447 product1 = (q31_t) (((q63_t) (Ialpha) * (0x40000000)) >> 31);
<> 140:97feb9bacc10 5448
<> 140:97feb9bacc10 5449 /* Intermediate product is calculated by (1/sqrt(3) * pIb) */
<> 140:97feb9bacc10 5450 product2 = (q31_t) (((q63_t) (Ibeta) * (0x6ED9EBA1)) >> 31);
<> 140:97feb9bacc10 5451
<> 140:97feb9bacc10 5452 /* pIb is calculated by subtracting the products */
<> 140:97feb9bacc10 5453 *pIb = __QSUB(product2, product1);
<> 140:97feb9bacc10 5454
<> 140:97feb9bacc10 5455 }
<> 140:97feb9bacc10 5456
<> 140:97feb9bacc10 5457 /**
<> 140:97feb9bacc10 5458 * @} end of inv_clarke group
<> 140:97feb9bacc10 5459 */
<> 140:97feb9bacc10 5460
<> 140:97feb9bacc10 5461 /**
<> 140:97feb9bacc10 5462 * @brief Converts the elements of the Q7 vector to Q15 vector.
<> 140:97feb9bacc10 5463 * @param[in] *pSrc input pointer
<> 140:97feb9bacc10 5464 * @param[out] *pDst output pointer
<> 140:97feb9bacc10 5465 * @param[in] blockSize number of samples to process
<> 140:97feb9bacc10 5466 * @return none.
<> 140:97feb9bacc10 5467 */
<> 140:97feb9bacc10 5468 void arm_q7_to_q15(
<> 140:97feb9bacc10 5469 q7_t * pSrc,
<> 140:97feb9bacc10 5470 q15_t * pDst,
<> 140:97feb9bacc10 5471 uint32_t blockSize);
<> 140:97feb9bacc10 5472
<> 140:97feb9bacc10 5473
<> 140:97feb9bacc10 5474
<> 140:97feb9bacc10 5475 /**
<> 140:97feb9bacc10 5476 * @ingroup groupController
<> 140:97feb9bacc10 5477 */
<> 140:97feb9bacc10 5478
<> 140:97feb9bacc10 5479 /**
<> 140:97feb9bacc10 5480 * @defgroup park Vector Park Transform
<> 140:97feb9bacc10 5481 *
<> 140:97feb9bacc10 5482 * Forward Park transform converts the input two-coordinate vector to flux and torque components.
<> 140:97feb9bacc10 5483 * The Park transform can be used to realize the transformation of the <code>Ialpha</code> and the <code>Ibeta</code> currents
<> 140:97feb9bacc10 5484 * from the stationary to the moving reference frame and control the spatial relationship between
<> 140:97feb9bacc10 5485 * the stator vector current and rotor flux vector.
<> 140:97feb9bacc10 5486 * If we consider the d axis aligned with the rotor flux, the diagram below shows the
<> 140:97feb9bacc10 5487 * current vector and the relationship from the two reference frames:
<> 140:97feb9bacc10 5488 * \image html park.gif "Stator current space vector and its component in (a,b) and in the d,q rotating reference frame"
<> 140:97feb9bacc10 5489 *
<> 140:97feb9bacc10 5490 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 140:97feb9bacc10 5491 * The library provides separate functions for Q31 and floating-point data types.
<> 140:97feb9bacc10 5492 * \par Algorithm
<> 140:97feb9bacc10 5493 * \image html parkFormula.gif
<> 140:97feb9bacc10 5494 * where <code>Ialpha</code> and <code>Ibeta</code> are the stator vector components,
<> 140:97feb9bacc10 5495 * <code>pId</code> and <code>pIq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
<> 140:97feb9bacc10 5496 * cosine and sine values of theta (rotor flux position).
<> 140:97feb9bacc10 5497 * \par Fixed-Point Behavior
<> 140:97feb9bacc10 5498 * Care must be taken when using the Q31 version of the Park transform.
<> 140:97feb9bacc10 5499 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 140:97feb9bacc10 5500 * Refer to the function specific documentation below for usage guidelines.
<> 140:97feb9bacc10 5501 */
<> 140:97feb9bacc10 5502
<> 140:97feb9bacc10 5503 /**
<> 140:97feb9bacc10 5504 * @addtogroup park
<> 140:97feb9bacc10 5505 * @{
<> 140:97feb9bacc10 5506 */
<> 140:97feb9bacc10 5507
<> 140:97feb9bacc10 5508 /**
<> 140:97feb9bacc10 5509 * @brief Floating-point Park transform
<> 140:97feb9bacc10 5510 * @param[in] Ialpha input two-phase vector coordinate alpha
<> 140:97feb9bacc10 5511 * @param[in] Ibeta input two-phase vector coordinate beta
<> 140:97feb9bacc10 5512 * @param[out] *pId points to output rotor reference frame d
<> 140:97feb9bacc10 5513 * @param[out] *pIq points to output rotor reference frame q
<> 140:97feb9bacc10 5514 * @param[in] sinVal sine value of rotation angle theta
<> 140:97feb9bacc10 5515 * @param[in] cosVal cosine value of rotation angle theta
<> 140:97feb9bacc10 5516 * @return none.
<> 140:97feb9bacc10 5517 *
<> 140:97feb9bacc10 5518 * The function implements the forward Park transform.
<> 140:97feb9bacc10 5519 *
<> 140:97feb9bacc10 5520 */
<> 140:97feb9bacc10 5521
<> 140:97feb9bacc10 5522 static __INLINE void arm_park_f32(
<> 140:97feb9bacc10 5523 float32_t Ialpha,
<> 140:97feb9bacc10 5524 float32_t Ibeta,
<> 140:97feb9bacc10 5525 float32_t * pId,
<> 140:97feb9bacc10 5526 float32_t * pIq,
<> 140:97feb9bacc10 5527 float32_t sinVal,
<> 140:97feb9bacc10 5528 float32_t cosVal)
<> 140:97feb9bacc10 5529 {
<> 140:97feb9bacc10 5530 /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */
<> 140:97feb9bacc10 5531 *pId = Ialpha * cosVal + Ibeta * sinVal;
<> 140:97feb9bacc10 5532
<> 140:97feb9bacc10 5533 /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */
<> 140:97feb9bacc10 5534 *pIq = -Ialpha * sinVal + Ibeta * cosVal;
<> 140:97feb9bacc10 5535
<> 140:97feb9bacc10 5536 }
<> 140:97feb9bacc10 5537
<> 140:97feb9bacc10 5538 /**
<> 140:97feb9bacc10 5539 * @brief Park transform for Q31 version
<> 140:97feb9bacc10 5540 * @param[in] Ialpha input two-phase vector coordinate alpha
<> 140:97feb9bacc10 5541 * @param[in] Ibeta input two-phase vector coordinate beta
<> 140:97feb9bacc10 5542 * @param[out] *pId points to output rotor reference frame d
<> 140:97feb9bacc10 5543 * @param[out] *pIq points to output rotor reference frame q
<> 140:97feb9bacc10 5544 * @param[in] sinVal sine value of rotation angle theta
<> 140:97feb9bacc10 5545 * @param[in] cosVal cosine value of rotation angle theta
<> 140:97feb9bacc10 5546 * @return none.
<> 140:97feb9bacc10 5547 *
<> 140:97feb9bacc10 5548 * <b>Scaling and Overflow Behavior:</b>
<> 140:97feb9bacc10 5549 * \par
<> 140:97feb9bacc10 5550 * The function is implemented using an internal 32-bit accumulator.
<> 140:97feb9bacc10 5551 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 140:97feb9bacc10 5552 * There is saturation on the addition and subtraction, hence there is no risk of overflow.
<> 140:97feb9bacc10 5553 */
<> 140:97feb9bacc10 5554
<> 140:97feb9bacc10 5555
<> 140:97feb9bacc10 5556 static __INLINE void arm_park_q31(
<> 140:97feb9bacc10 5557 q31_t Ialpha,
<> 140:97feb9bacc10 5558 q31_t Ibeta,
<> 140:97feb9bacc10 5559 q31_t * pId,
<> 140:97feb9bacc10 5560 q31_t * pIq,
<> 140:97feb9bacc10 5561 q31_t sinVal,
<> 140:97feb9bacc10 5562 q31_t cosVal)
<> 140:97feb9bacc10 5563 {
<> 140:97feb9bacc10 5564 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 140:97feb9bacc10 5565 q31_t product3, product4; /* Temporary variables used to store intermediate results */
<> 140:97feb9bacc10 5566
<> 140:97feb9bacc10 5567 /* Intermediate product is calculated by (Ialpha * cosVal) */
<> 140:97feb9bacc10 5568 product1 = (q31_t) (((q63_t) (Ialpha) * (cosVal)) >> 31);
<> 140:97feb9bacc10 5569
<> 140:97feb9bacc10 5570 /* Intermediate product is calculated by (Ibeta * sinVal) */
<> 140:97feb9bacc10 5571 product2 = (q31_t) (((q63_t) (Ibeta) * (sinVal)) >> 31);
<> 140:97feb9bacc10 5572
<> 140:97feb9bacc10 5573
<> 140:97feb9bacc10 5574 /* Intermediate product is calculated by (Ialpha * sinVal) */
<> 140:97feb9bacc10 5575 product3 = (q31_t) (((q63_t) (Ialpha) * (sinVal)) >> 31);
<> 140:97feb9bacc10 5576
<> 140:97feb9bacc10 5577 /* Intermediate product is calculated by (Ibeta * cosVal) */
<> 140:97feb9bacc10 5578 product4 = (q31_t) (((q63_t) (Ibeta) * (cosVal)) >> 31);
<> 140:97feb9bacc10 5579
<> 140:97feb9bacc10 5580 /* Calculate pId by adding the two intermediate products 1 and 2 */
<> 140:97feb9bacc10 5581 *pId = __QADD(product1, product2);
<> 140:97feb9bacc10 5582
<> 140:97feb9bacc10 5583 /* Calculate pIq by subtracting the two intermediate products 3 from 4 */
<> 140:97feb9bacc10 5584 *pIq = __QSUB(product4, product3);
<> 140:97feb9bacc10 5585 }
<> 140:97feb9bacc10 5586
<> 140:97feb9bacc10 5587 /**
<> 140:97feb9bacc10 5588 * @} end of park group
<> 140:97feb9bacc10 5589 */
<> 140:97feb9bacc10 5590
<> 140:97feb9bacc10 5591 /**
<> 140:97feb9bacc10 5592 * @brief Converts the elements of the Q7 vector to floating-point vector.
<> 140:97feb9bacc10 5593 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 5594 * @param[out] *pDst is output pointer
<> 140:97feb9bacc10 5595 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 5596 * @return none.
<> 140:97feb9bacc10 5597 */
<> 140:97feb9bacc10 5598 void arm_q7_to_float(
<> 140:97feb9bacc10 5599 q7_t * pSrc,
<> 140:97feb9bacc10 5600 float32_t * pDst,
<> 140:97feb9bacc10 5601 uint32_t blockSize);
<> 140:97feb9bacc10 5602
<> 140:97feb9bacc10 5603
<> 140:97feb9bacc10 5604 /**
<> 140:97feb9bacc10 5605 * @ingroup groupController
<> 140:97feb9bacc10 5606 */
<> 140:97feb9bacc10 5607
<> 140:97feb9bacc10 5608 /**
<> 140:97feb9bacc10 5609 * @defgroup inv_park Vector Inverse Park transform
<> 140:97feb9bacc10 5610 * Inverse Park transform converts the input flux and torque components to two-coordinate vector.
<> 140:97feb9bacc10 5611 *
<> 140:97feb9bacc10 5612 * The function operates on a single sample of data and each call to the function returns the processed output.
<> 140:97feb9bacc10 5613 * The library provides separate functions for Q31 and floating-point data types.
<> 140:97feb9bacc10 5614 * \par Algorithm
<> 140:97feb9bacc10 5615 * \image html parkInvFormula.gif
<> 140:97feb9bacc10 5616 * where <code>pIalpha</code> and <code>pIbeta</code> are the stator vector components,
<> 140:97feb9bacc10 5617 * <code>Id</code> and <code>Iq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
<> 140:97feb9bacc10 5618 * cosine and sine values of theta (rotor flux position).
<> 140:97feb9bacc10 5619 * \par Fixed-Point Behavior
<> 140:97feb9bacc10 5620 * Care must be taken when using the Q31 version of the Park transform.
<> 140:97feb9bacc10 5621 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
<> 140:97feb9bacc10 5622 * Refer to the function specific documentation below for usage guidelines.
<> 140:97feb9bacc10 5623 */
<> 140:97feb9bacc10 5624
<> 140:97feb9bacc10 5625 /**
<> 140:97feb9bacc10 5626 * @addtogroup inv_park
<> 140:97feb9bacc10 5627 * @{
<> 140:97feb9bacc10 5628 */
<> 140:97feb9bacc10 5629
<> 140:97feb9bacc10 5630 /**
<> 140:97feb9bacc10 5631 * @brief Floating-point Inverse Park transform
<> 140:97feb9bacc10 5632 * @param[in] Id input coordinate of rotor reference frame d
<> 140:97feb9bacc10 5633 * @param[in] Iq input coordinate of rotor reference frame q
<> 140:97feb9bacc10 5634 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 140:97feb9bacc10 5635 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 140:97feb9bacc10 5636 * @param[in] sinVal sine value of rotation angle theta
<> 140:97feb9bacc10 5637 * @param[in] cosVal cosine value of rotation angle theta
<> 140:97feb9bacc10 5638 * @return none.
<> 140:97feb9bacc10 5639 */
<> 140:97feb9bacc10 5640
<> 140:97feb9bacc10 5641 static __INLINE void arm_inv_park_f32(
<> 140:97feb9bacc10 5642 float32_t Id,
<> 140:97feb9bacc10 5643 float32_t Iq,
<> 140:97feb9bacc10 5644 float32_t * pIalpha,
<> 140:97feb9bacc10 5645 float32_t * pIbeta,
<> 140:97feb9bacc10 5646 float32_t sinVal,
<> 140:97feb9bacc10 5647 float32_t cosVal)
<> 140:97feb9bacc10 5648 {
<> 140:97feb9bacc10 5649 /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */
<> 140:97feb9bacc10 5650 *pIalpha = Id * cosVal - Iq * sinVal;
<> 140:97feb9bacc10 5651
<> 140:97feb9bacc10 5652 /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */
<> 140:97feb9bacc10 5653 *pIbeta = Id * sinVal + Iq * cosVal;
<> 140:97feb9bacc10 5654
<> 140:97feb9bacc10 5655 }
<> 140:97feb9bacc10 5656
<> 140:97feb9bacc10 5657
<> 140:97feb9bacc10 5658 /**
<> 140:97feb9bacc10 5659 * @brief Inverse Park transform for Q31 version
<> 140:97feb9bacc10 5660 * @param[in] Id input coordinate of rotor reference frame d
<> 140:97feb9bacc10 5661 * @param[in] Iq input coordinate of rotor reference frame q
<> 140:97feb9bacc10 5662 * @param[out] *pIalpha points to output two-phase orthogonal vector axis alpha
<> 140:97feb9bacc10 5663 * @param[out] *pIbeta points to output two-phase orthogonal vector axis beta
<> 140:97feb9bacc10 5664 * @param[in] sinVal sine value of rotation angle theta
<> 140:97feb9bacc10 5665 * @param[in] cosVal cosine value of rotation angle theta
<> 140:97feb9bacc10 5666 * @return none.
<> 140:97feb9bacc10 5667 *
<> 140:97feb9bacc10 5668 * <b>Scaling and Overflow Behavior:</b>
<> 140:97feb9bacc10 5669 * \par
<> 140:97feb9bacc10 5670 * The function is implemented using an internal 32-bit accumulator.
<> 140:97feb9bacc10 5671 * The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplication in 2.62 format.
<> 140:97feb9bacc10 5672 * There is saturation on the addition, hence there is no risk of overflow.
<> 140:97feb9bacc10 5673 */
<> 140:97feb9bacc10 5674
<> 140:97feb9bacc10 5675
<> 140:97feb9bacc10 5676 static __INLINE void arm_inv_park_q31(
<> 140:97feb9bacc10 5677 q31_t Id,
<> 140:97feb9bacc10 5678 q31_t Iq,
<> 140:97feb9bacc10 5679 q31_t * pIalpha,
<> 140:97feb9bacc10 5680 q31_t * pIbeta,
<> 140:97feb9bacc10 5681 q31_t sinVal,
<> 140:97feb9bacc10 5682 q31_t cosVal)
<> 140:97feb9bacc10 5683 {
<> 140:97feb9bacc10 5684 q31_t product1, product2; /* Temporary variables used to store intermediate results */
<> 140:97feb9bacc10 5685 q31_t product3, product4; /* Temporary variables used to store intermediate results */
<> 140:97feb9bacc10 5686
<> 140:97feb9bacc10 5687 /* Intermediate product is calculated by (Id * cosVal) */
<> 140:97feb9bacc10 5688 product1 = (q31_t) (((q63_t) (Id) * (cosVal)) >> 31);
<> 140:97feb9bacc10 5689
<> 140:97feb9bacc10 5690 /* Intermediate product is calculated by (Iq * sinVal) */
<> 140:97feb9bacc10 5691 product2 = (q31_t) (((q63_t) (Iq) * (sinVal)) >> 31);
<> 140:97feb9bacc10 5692
<> 140:97feb9bacc10 5693
<> 140:97feb9bacc10 5694 /* Intermediate product is calculated by (Id * sinVal) */
<> 140:97feb9bacc10 5695 product3 = (q31_t) (((q63_t) (Id) * (sinVal)) >> 31);
<> 140:97feb9bacc10 5696
<> 140:97feb9bacc10 5697 /* Intermediate product is calculated by (Iq * cosVal) */
<> 140:97feb9bacc10 5698 product4 = (q31_t) (((q63_t) (Iq) * (cosVal)) >> 31);
<> 140:97feb9bacc10 5699
<> 140:97feb9bacc10 5700 /* Calculate pIalpha by using the two intermediate products 1 and 2 */
<> 140:97feb9bacc10 5701 *pIalpha = __QSUB(product1, product2);
<> 140:97feb9bacc10 5702
<> 140:97feb9bacc10 5703 /* Calculate pIbeta by using the two intermediate products 3 and 4 */
<> 140:97feb9bacc10 5704 *pIbeta = __QADD(product4, product3);
<> 140:97feb9bacc10 5705
<> 140:97feb9bacc10 5706 }
<> 140:97feb9bacc10 5707
<> 140:97feb9bacc10 5708 /**
<> 140:97feb9bacc10 5709 * @} end of Inverse park group
<> 140:97feb9bacc10 5710 */
<> 140:97feb9bacc10 5711
<> 140:97feb9bacc10 5712
<> 140:97feb9bacc10 5713 /**
<> 140:97feb9bacc10 5714 * @brief Converts the elements of the Q31 vector to floating-point vector.
<> 140:97feb9bacc10 5715 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 5716 * @param[out] *pDst is output pointer
<> 140:97feb9bacc10 5717 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 5718 * @return none.
<> 140:97feb9bacc10 5719 */
<> 140:97feb9bacc10 5720 void arm_q31_to_float(
<> 140:97feb9bacc10 5721 q31_t * pSrc,
<> 140:97feb9bacc10 5722 float32_t * pDst,
<> 140:97feb9bacc10 5723 uint32_t blockSize);
<> 140:97feb9bacc10 5724
<> 140:97feb9bacc10 5725 /**
<> 140:97feb9bacc10 5726 * @ingroup groupInterpolation
<> 140:97feb9bacc10 5727 */
<> 140:97feb9bacc10 5728
<> 140:97feb9bacc10 5729 /**
<> 140:97feb9bacc10 5730 * @defgroup LinearInterpolate Linear Interpolation
<> 140:97feb9bacc10 5731 *
<> 140:97feb9bacc10 5732 * Linear interpolation is a method of curve fitting using linear polynomials.
<> 140:97feb9bacc10 5733 * Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line
<> 140:97feb9bacc10 5734 *
<> 140:97feb9bacc10 5735 * \par
<> 140:97feb9bacc10 5736 * \image html LinearInterp.gif "Linear interpolation"
<> 140:97feb9bacc10 5737 *
<> 140:97feb9bacc10 5738 * \par
<> 140:97feb9bacc10 5739 * A Linear Interpolate function calculates an output value(y), for the input(x)
<> 140:97feb9bacc10 5740 * using linear interpolation of the input values x0, x1( nearest input values) and the output values y0 and y1(nearest output values)
<> 140:97feb9bacc10 5741 *
<> 140:97feb9bacc10 5742 * \par Algorithm:
<> 140:97feb9bacc10 5743 * <pre>
<> 140:97feb9bacc10 5744 * y = y0 + (x - x0) * ((y1 - y0)/(x1-x0))
<> 140:97feb9bacc10 5745 * where x0, x1 are nearest values of input x
<> 140:97feb9bacc10 5746 * y0, y1 are nearest values to output y
<> 140:97feb9bacc10 5747 * </pre>
<> 140:97feb9bacc10 5748 *
<> 140:97feb9bacc10 5749 * \par
<> 140:97feb9bacc10 5750 * This set of functions implements Linear interpolation process
<> 140:97feb9bacc10 5751 * for Q7, Q15, Q31, and floating-point data types. The functions operate on a single
<> 140:97feb9bacc10 5752 * sample of data and each call to the function returns a single processed value.
<> 140:97feb9bacc10 5753 * <code>S</code> points to an instance of the Linear Interpolate function data structure.
<> 140:97feb9bacc10 5754 * <code>x</code> is the input sample value. The functions returns the output value.
<> 140:97feb9bacc10 5755 *
<> 140:97feb9bacc10 5756 * \par
<> 140:97feb9bacc10 5757 * if x is outside of the table boundary, Linear interpolation returns first value of the table
<> 140:97feb9bacc10 5758 * if x is below input range and returns last value of table if x is above range.
<> 140:97feb9bacc10 5759 */
<> 140:97feb9bacc10 5760
<> 140:97feb9bacc10 5761 /**
<> 140:97feb9bacc10 5762 * @addtogroup LinearInterpolate
<> 140:97feb9bacc10 5763 * @{
<> 140:97feb9bacc10 5764 */
<> 140:97feb9bacc10 5765
<> 140:97feb9bacc10 5766 /**
<> 140:97feb9bacc10 5767 * @brief Process function for the floating-point Linear Interpolation Function.
<> 140:97feb9bacc10 5768 * @param[in,out] *S is an instance of the floating-point Linear Interpolation structure
<> 140:97feb9bacc10 5769 * @param[in] x input sample to process
<> 140:97feb9bacc10 5770 * @return y processed output sample.
<> 140:97feb9bacc10 5771 *
<> 140:97feb9bacc10 5772 */
<> 140:97feb9bacc10 5773
<> 140:97feb9bacc10 5774 static __INLINE float32_t arm_linear_interp_f32(
<> 140:97feb9bacc10 5775 arm_linear_interp_instance_f32 * S,
<> 140:97feb9bacc10 5776 float32_t x)
<> 140:97feb9bacc10 5777 {
<> 140:97feb9bacc10 5778
<> 140:97feb9bacc10 5779 float32_t y;
<> 140:97feb9bacc10 5780 float32_t x0, x1; /* Nearest input values */
<> 140:97feb9bacc10 5781 float32_t y0, y1; /* Nearest output values */
<> 140:97feb9bacc10 5782 float32_t xSpacing = S->xSpacing; /* spacing between input values */
<> 140:97feb9bacc10 5783 int32_t i; /* Index variable */
<> 140:97feb9bacc10 5784 float32_t *pYData = S->pYData; /* pointer to output table */
<> 140:97feb9bacc10 5785
<> 140:97feb9bacc10 5786 /* Calculation of index */
<> 140:97feb9bacc10 5787 i = (int32_t) ((x - S->x1) / xSpacing);
<> 140:97feb9bacc10 5788
<> 140:97feb9bacc10 5789 if(i < 0)
<> 140:97feb9bacc10 5790 {
<> 140:97feb9bacc10 5791 /* Iniatilize output for below specified range as least output value of table */
<> 140:97feb9bacc10 5792 y = pYData[0];
<> 140:97feb9bacc10 5793 }
<> 140:97feb9bacc10 5794 else if((uint32_t)i >= S->nValues)
<> 140:97feb9bacc10 5795 {
<> 140:97feb9bacc10 5796 /* Iniatilize output for above specified range as last output value of table */
<> 140:97feb9bacc10 5797 y = pYData[S->nValues - 1];
<> 140:97feb9bacc10 5798 }
<> 140:97feb9bacc10 5799 else
<> 140:97feb9bacc10 5800 {
<> 140:97feb9bacc10 5801 /* Calculation of nearest input values */
<> 140:97feb9bacc10 5802 x0 = S->x1 + i * xSpacing;
<> 140:97feb9bacc10 5803 x1 = S->x1 + (i + 1) * xSpacing;
<> 140:97feb9bacc10 5804
<> 140:97feb9bacc10 5805 /* Read of nearest output values */
<> 140:97feb9bacc10 5806 y0 = pYData[i];
<> 140:97feb9bacc10 5807 y1 = pYData[i + 1];
<> 140:97feb9bacc10 5808
<> 140:97feb9bacc10 5809 /* Calculation of output */
<> 140:97feb9bacc10 5810 y = y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
<> 140:97feb9bacc10 5811
<> 140:97feb9bacc10 5812 }
<> 140:97feb9bacc10 5813
<> 140:97feb9bacc10 5814 /* returns output value */
<> 140:97feb9bacc10 5815 return (y);
<> 140:97feb9bacc10 5816 }
<> 140:97feb9bacc10 5817
<> 140:97feb9bacc10 5818 /**
<> 140:97feb9bacc10 5819 *
<> 140:97feb9bacc10 5820 * @brief Process function for the Q31 Linear Interpolation Function.
<> 140:97feb9bacc10 5821 * @param[in] *pYData pointer to Q31 Linear Interpolation table
<> 140:97feb9bacc10 5822 * @param[in] x input sample to process
<> 140:97feb9bacc10 5823 * @param[in] nValues number of table values
<> 140:97feb9bacc10 5824 * @return y processed output sample.
<> 140:97feb9bacc10 5825 *
<> 140:97feb9bacc10 5826 * \par
<> 140:97feb9bacc10 5827 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 140:97feb9bacc10 5828 * This function can support maximum of table size 2^12.
<> 140:97feb9bacc10 5829 *
<> 140:97feb9bacc10 5830 */
<> 140:97feb9bacc10 5831
<> 140:97feb9bacc10 5832
<> 140:97feb9bacc10 5833 static __INLINE q31_t arm_linear_interp_q31(
<> 140:97feb9bacc10 5834 q31_t * pYData,
<> 140:97feb9bacc10 5835 q31_t x,
<> 140:97feb9bacc10 5836 uint32_t nValues)
<> 140:97feb9bacc10 5837 {
<> 140:97feb9bacc10 5838 q31_t y; /* output */
<> 140:97feb9bacc10 5839 q31_t y0, y1; /* Nearest output values */
<> 140:97feb9bacc10 5840 q31_t fract; /* fractional part */
<> 140:97feb9bacc10 5841 int32_t index; /* Index to read nearest output values */
<> 140:97feb9bacc10 5842
<> 140:97feb9bacc10 5843 /* Input is in 12.20 format */
<> 140:97feb9bacc10 5844 /* 12 bits for the table index */
<> 140:97feb9bacc10 5845 /* Index value calculation */
<> 140:97feb9bacc10 5846 index = ((x & 0xFFF00000) >> 20);
<> 140:97feb9bacc10 5847
<> 140:97feb9bacc10 5848 if(index >= (int32_t)(nValues - 1))
<> 140:97feb9bacc10 5849 {
<> 140:97feb9bacc10 5850 return (pYData[nValues - 1]);
<> 140:97feb9bacc10 5851 }
<> 140:97feb9bacc10 5852 else if(index < 0)
<> 140:97feb9bacc10 5853 {
<> 140:97feb9bacc10 5854 return (pYData[0]);
<> 140:97feb9bacc10 5855 }
<> 140:97feb9bacc10 5856 else
<> 140:97feb9bacc10 5857 {
<> 140:97feb9bacc10 5858
<> 140:97feb9bacc10 5859 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 5860 /* shift left by 11 to keep fract in 1.31 format */
<> 140:97feb9bacc10 5861 fract = (x & 0x000FFFFF) << 11;
<> 140:97feb9bacc10 5862
<> 140:97feb9bacc10 5863 /* Read two nearest output values from the index in 1.31(q31) format */
<> 140:97feb9bacc10 5864 y0 = pYData[index];
<> 140:97feb9bacc10 5865 y1 = pYData[index + 1u];
<> 140:97feb9bacc10 5866
<> 140:97feb9bacc10 5867 /* Calculation of y0 * (1-fract) and y is in 2.30 format */
<> 140:97feb9bacc10 5868 y = ((q31_t) ((q63_t) y0 * (0x7FFFFFFF - fract) >> 32));
<> 140:97feb9bacc10 5869
<> 140:97feb9bacc10 5870 /* Calculation of y0 * (1-fract) + y1 *fract and y is in 2.30 format */
<> 140:97feb9bacc10 5871 y += ((q31_t) (((q63_t) y1 * fract) >> 32));
<> 140:97feb9bacc10 5872
<> 140:97feb9bacc10 5873 /* Convert y to 1.31 format */
<> 140:97feb9bacc10 5874 return (y << 1u);
<> 140:97feb9bacc10 5875
<> 140:97feb9bacc10 5876 }
<> 140:97feb9bacc10 5877
<> 140:97feb9bacc10 5878 }
<> 140:97feb9bacc10 5879
<> 140:97feb9bacc10 5880 /**
<> 140:97feb9bacc10 5881 *
<> 140:97feb9bacc10 5882 * @brief Process function for the Q15 Linear Interpolation Function.
<> 140:97feb9bacc10 5883 * @param[in] *pYData pointer to Q15 Linear Interpolation table
<> 140:97feb9bacc10 5884 * @param[in] x input sample to process
<> 140:97feb9bacc10 5885 * @param[in] nValues number of table values
<> 140:97feb9bacc10 5886 * @return y processed output sample.
<> 140:97feb9bacc10 5887 *
<> 140:97feb9bacc10 5888 * \par
<> 140:97feb9bacc10 5889 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 140:97feb9bacc10 5890 * This function can support maximum of table size 2^12.
<> 140:97feb9bacc10 5891 *
<> 140:97feb9bacc10 5892 */
<> 140:97feb9bacc10 5893
<> 140:97feb9bacc10 5894
<> 140:97feb9bacc10 5895 static __INLINE q15_t arm_linear_interp_q15(
<> 140:97feb9bacc10 5896 q15_t * pYData,
<> 140:97feb9bacc10 5897 q31_t x,
<> 140:97feb9bacc10 5898 uint32_t nValues)
<> 140:97feb9bacc10 5899 {
<> 140:97feb9bacc10 5900 q63_t y; /* output */
<> 140:97feb9bacc10 5901 q15_t y0, y1; /* Nearest output values */
<> 140:97feb9bacc10 5902 q31_t fract; /* fractional part */
<> 140:97feb9bacc10 5903 int32_t index; /* Index to read nearest output values */
<> 140:97feb9bacc10 5904
<> 140:97feb9bacc10 5905 /* Input is in 12.20 format */
<> 140:97feb9bacc10 5906 /* 12 bits for the table index */
<> 140:97feb9bacc10 5907 /* Index value calculation */
<> 140:97feb9bacc10 5908 index = ((x & 0xFFF00000) >> 20u);
<> 140:97feb9bacc10 5909
<> 140:97feb9bacc10 5910 if(index >= (int32_t)(nValues - 1))
<> 140:97feb9bacc10 5911 {
<> 140:97feb9bacc10 5912 return (pYData[nValues - 1]);
<> 140:97feb9bacc10 5913 }
<> 140:97feb9bacc10 5914 else if(index < 0)
<> 140:97feb9bacc10 5915 {
<> 140:97feb9bacc10 5916 return (pYData[0]);
<> 140:97feb9bacc10 5917 }
<> 140:97feb9bacc10 5918 else
<> 140:97feb9bacc10 5919 {
<> 140:97feb9bacc10 5920 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 5921 /* fract is in 12.20 format */
<> 140:97feb9bacc10 5922 fract = (x & 0x000FFFFF);
<> 140:97feb9bacc10 5923
<> 140:97feb9bacc10 5924 /* Read two nearest output values from the index */
<> 140:97feb9bacc10 5925 y0 = pYData[index];
<> 140:97feb9bacc10 5926 y1 = pYData[index + 1u];
<> 140:97feb9bacc10 5927
<> 140:97feb9bacc10 5928 /* Calculation of y0 * (1-fract) and y is in 13.35 format */
<> 140:97feb9bacc10 5929 y = ((q63_t) y0 * (0xFFFFF - fract));
<> 140:97feb9bacc10 5930
<> 140:97feb9bacc10 5931 /* Calculation of (y0 * (1-fract) + y1 * fract) and y is in 13.35 format */
<> 140:97feb9bacc10 5932 y += ((q63_t) y1 * (fract));
<> 140:97feb9bacc10 5933
<> 140:97feb9bacc10 5934 /* convert y to 1.15 format */
<> 140:97feb9bacc10 5935 return (y >> 20);
<> 140:97feb9bacc10 5936 }
<> 140:97feb9bacc10 5937
<> 140:97feb9bacc10 5938
<> 140:97feb9bacc10 5939 }
<> 140:97feb9bacc10 5940
<> 140:97feb9bacc10 5941 /**
<> 140:97feb9bacc10 5942 *
<> 140:97feb9bacc10 5943 * @brief Process function for the Q7 Linear Interpolation Function.
<> 140:97feb9bacc10 5944 * @param[in] *pYData pointer to Q7 Linear Interpolation table
<> 140:97feb9bacc10 5945 * @param[in] x input sample to process
<> 140:97feb9bacc10 5946 * @param[in] nValues number of table values
<> 140:97feb9bacc10 5947 * @return y processed output sample.
<> 140:97feb9bacc10 5948 *
<> 140:97feb9bacc10 5949 * \par
<> 140:97feb9bacc10 5950 * Input sample <code>x</code> is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part.
<> 140:97feb9bacc10 5951 * This function can support maximum of table size 2^12.
<> 140:97feb9bacc10 5952 */
<> 140:97feb9bacc10 5953
<> 140:97feb9bacc10 5954
<> 140:97feb9bacc10 5955 static __INLINE q7_t arm_linear_interp_q7(
<> 140:97feb9bacc10 5956 q7_t * pYData,
<> 140:97feb9bacc10 5957 q31_t x,
<> 140:97feb9bacc10 5958 uint32_t nValues)
<> 140:97feb9bacc10 5959 {
<> 140:97feb9bacc10 5960 q31_t y; /* output */
<> 140:97feb9bacc10 5961 q7_t y0, y1; /* Nearest output values */
<> 140:97feb9bacc10 5962 q31_t fract; /* fractional part */
<> 140:97feb9bacc10 5963 uint32_t index; /* Index to read nearest output values */
<> 140:97feb9bacc10 5964
<> 140:97feb9bacc10 5965 /* Input is in 12.20 format */
<> 140:97feb9bacc10 5966 /* 12 bits for the table index */
<> 140:97feb9bacc10 5967 /* Index value calculation */
<> 140:97feb9bacc10 5968 if (x < 0)
<> 140:97feb9bacc10 5969 {
<> 140:97feb9bacc10 5970 return (pYData[0]);
<> 140:97feb9bacc10 5971 }
<> 140:97feb9bacc10 5972 index = (x >> 20) & 0xfff;
<> 140:97feb9bacc10 5973
<> 140:97feb9bacc10 5974
<> 140:97feb9bacc10 5975 if(index >= (nValues - 1))
<> 140:97feb9bacc10 5976 {
<> 140:97feb9bacc10 5977 return (pYData[nValues - 1]);
<> 140:97feb9bacc10 5978 }
<> 140:97feb9bacc10 5979 else
<> 140:97feb9bacc10 5980 {
<> 140:97feb9bacc10 5981
<> 140:97feb9bacc10 5982 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 5983 /* fract is in 12.20 format */
<> 140:97feb9bacc10 5984 fract = (x & 0x000FFFFF);
<> 140:97feb9bacc10 5985
<> 140:97feb9bacc10 5986 /* Read two nearest output values from the index and are in 1.7(q7) format */
<> 140:97feb9bacc10 5987 y0 = pYData[index];
<> 140:97feb9bacc10 5988 y1 = pYData[index + 1u];
<> 140:97feb9bacc10 5989
<> 140:97feb9bacc10 5990 /* Calculation of y0 * (1-fract ) and y is in 13.27(q27) format */
<> 140:97feb9bacc10 5991 y = ((y0 * (0xFFFFF - fract)));
<> 140:97feb9bacc10 5992
<> 140:97feb9bacc10 5993 /* Calculation of y1 * fract + y0 * (1-fract) and y is in 13.27(q27) format */
<> 140:97feb9bacc10 5994 y += (y1 * fract);
<> 140:97feb9bacc10 5995
<> 140:97feb9bacc10 5996 /* convert y to 1.7(q7) format */
<> 140:97feb9bacc10 5997 return (y >> 20u);
<> 140:97feb9bacc10 5998
<> 140:97feb9bacc10 5999 }
<> 140:97feb9bacc10 6000
<> 140:97feb9bacc10 6001 }
<> 140:97feb9bacc10 6002 /**
<> 140:97feb9bacc10 6003 * @} end of LinearInterpolate group
<> 140:97feb9bacc10 6004 */
<> 140:97feb9bacc10 6005
<> 140:97feb9bacc10 6006 /**
<> 140:97feb9bacc10 6007 * @brief Fast approximation to the trigonometric sine function for floating-point data.
<> 140:97feb9bacc10 6008 * @param[in] x input value in radians.
<> 140:97feb9bacc10 6009 * @return sin(x).
<> 140:97feb9bacc10 6010 */
<> 140:97feb9bacc10 6011
<> 140:97feb9bacc10 6012 float32_t arm_sin_f32(
<> 140:97feb9bacc10 6013 float32_t x);
<> 140:97feb9bacc10 6014
<> 140:97feb9bacc10 6015 /**
<> 140:97feb9bacc10 6016 * @brief Fast approximation to the trigonometric sine function for Q31 data.
<> 140:97feb9bacc10 6017 * @param[in] x Scaled input value in radians.
<> 140:97feb9bacc10 6018 * @return sin(x).
<> 140:97feb9bacc10 6019 */
<> 140:97feb9bacc10 6020
<> 140:97feb9bacc10 6021 q31_t arm_sin_q31(
<> 140:97feb9bacc10 6022 q31_t x);
<> 140:97feb9bacc10 6023
<> 140:97feb9bacc10 6024 /**
<> 140:97feb9bacc10 6025 * @brief Fast approximation to the trigonometric sine function for Q15 data.
<> 140:97feb9bacc10 6026 * @param[in] x Scaled input value in radians.
<> 140:97feb9bacc10 6027 * @return sin(x).
<> 140:97feb9bacc10 6028 */
<> 140:97feb9bacc10 6029
<> 140:97feb9bacc10 6030 q15_t arm_sin_q15(
<> 140:97feb9bacc10 6031 q15_t x);
<> 140:97feb9bacc10 6032
<> 140:97feb9bacc10 6033 /**
<> 140:97feb9bacc10 6034 * @brief Fast approximation to the trigonometric cosine function for floating-point data.
<> 140:97feb9bacc10 6035 * @param[in] x input value in radians.
<> 140:97feb9bacc10 6036 * @return cos(x).
<> 140:97feb9bacc10 6037 */
<> 140:97feb9bacc10 6038
<> 140:97feb9bacc10 6039 float32_t arm_cos_f32(
<> 140:97feb9bacc10 6040 float32_t x);
<> 140:97feb9bacc10 6041
<> 140:97feb9bacc10 6042 /**
<> 140:97feb9bacc10 6043 * @brief Fast approximation to the trigonometric cosine function for Q31 data.
<> 140:97feb9bacc10 6044 * @param[in] x Scaled input value in radians.
<> 140:97feb9bacc10 6045 * @return cos(x).
<> 140:97feb9bacc10 6046 */
<> 140:97feb9bacc10 6047
<> 140:97feb9bacc10 6048 q31_t arm_cos_q31(
<> 140:97feb9bacc10 6049 q31_t x);
<> 140:97feb9bacc10 6050
<> 140:97feb9bacc10 6051 /**
<> 140:97feb9bacc10 6052 * @brief Fast approximation to the trigonometric cosine function for Q15 data.
<> 140:97feb9bacc10 6053 * @param[in] x Scaled input value in radians.
<> 140:97feb9bacc10 6054 * @return cos(x).
<> 140:97feb9bacc10 6055 */
<> 140:97feb9bacc10 6056
<> 140:97feb9bacc10 6057 q15_t arm_cos_q15(
<> 140:97feb9bacc10 6058 q15_t x);
<> 140:97feb9bacc10 6059
<> 140:97feb9bacc10 6060
<> 140:97feb9bacc10 6061 /**
<> 140:97feb9bacc10 6062 * @ingroup groupFastMath
<> 140:97feb9bacc10 6063 */
<> 140:97feb9bacc10 6064
<> 140:97feb9bacc10 6065
<> 140:97feb9bacc10 6066 /**
<> 140:97feb9bacc10 6067 * @defgroup SQRT Square Root
<> 140:97feb9bacc10 6068 *
<> 140:97feb9bacc10 6069 * Computes the square root of a number.
<> 140:97feb9bacc10 6070 * There are separate functions for Q15, Q31, and floating-point data types.
<> 140:97feb9bacc10 6071 * The square root function is computed using the Newton-Raphson algorithm.
<> 140:97feb9bacc10 6072 * This is an iterative algorithm of the form:
<> 140:97feb9bacc10 6073 * <pre>
<> 140:97feb9bacc10 6074 * x1 = x0 - f(x0)/f'(x0)
<> 140:97feb9bacc10 6075 * </pre>
<> 140:97feb9bacc10 6076 * where <code>x1</code> is the current estimate,
<> 140:97feb9bacc10 6077 * <code>x0</code> is the previous estimate, and
<> 140:97feb9bacc10 6078 * <code>f'(x0)</code> is the derivative of <code>f()</code> evaluated at <code>x0</code>.
<> 140:97feb9bacc10 6079 * For the square root function, the algorithm reduces to:
<> 140:97feb9bacc10 6080 * <pre>
<> 140:97feb9bacc10 6081 * x0 = in/2 [initial guess]
<> 140:97feb9bacc10 6082 * x1 = 1/2 * ( x0 + in / x0) [each iteration]
<> 140:97feb9bacc10 6083 * </pre>
<> 140:97feb9bacc10 6084 */
<> 140:97feb9bacc10 6085
<> 140:97feb9bacc10 6086
<> 140:97feb9bacc10 6087 /**
<> 140:97feb9bacc10 6088 * @addtogroup SQRT
<> 140:97feb9bacc10 6089 * @{
<> 140:97feb9bacc10 6090 */
<> 140:97feb9bacc10 6091
<> 140:97feb9bacc10 6092 /**
<> 140:97feb9bacc10 6093 * @brief Floating-point square root function.
<> 140:97feb9bacc10 6094 * @param[in] in input value.
<> 140:97feb9bacc10 6095 * @param[out] *pOut square root of input value.
<> 140:97feb9bacc10 6096 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 140:97feb9bacc10 6097 * <code>in</code> is negative value and returns zero output for negative values.
<> 140:97feb9bacc10 6098 */
<> 140:97feb9bacc10 6099
<> 140:97feb9bacc10 6100 static __INLINE arm_status arm_sqrt_f32(
<> 140:97feb9bacc10 6101 float32_t in,
<> 140:97feb9bacc10 6102 float32_t * pOut)
<> 140:97feb9bacc10 6103 {
<> 140:97feb9bacc10 6104 if(in >= 0.0f)
<> 140:97feb9bacc10 6105 {
<> 140:97feb9bacc10 6106
<> 140:97feb9bacc10 6107 // #if __FPU_USED
<> 140:97feb9bacc10 6108 #if (__FPU_USED == 1) && defined ( __CC_ARM )
<> 140:97feb9bacc10 6109 *pOut = __sqrtf(in);
<> 140:97feb9bacc10 6110 #else
<> 140:97feb9bacc10 6111 *pOut = sqrtf(in);
<> 140:97feb9bacc10 6112 #endif
<> 140:97feb9bacc10 6113
<> 140:97feb9bacc10 6114 return (ARM_MATH_SUCCESS);
<> 140:97feb9bacc10 6115 }
<> 140:97feb9bacc10 6116 else
<> 140:97feb9bacc10 6117 {
<> 140:97feb9bacc10 6118 *pOut = 0.0f;
<> 140:97feb9bacc10 6119 return (ARM_MATH_ARGUMENT_ERROR);
<> 140:97feb9bacc10 6120 }
<> 140:97feb9bacc10 6121
<> 140:97feb9bacc10 6122 }
<> 140:97feb9bacc10 6123
<> 140:97feb9bacc10 6124
<> 140:97feb9bacc10 6125 /**
<> 140:97feb9bacc10 6126 * @brief Q31 square root function.
<> 140:97feb9bacc10 6127 * @param[in] in input value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFFFFF.
<> 140:97feb9bacc10 6128 * @param[out] *pOut square root of input value.
<> 140:97feb9bacc10 6129 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 140:97feb9bacc10 6130 * <code>in</code> is negative value and returns zero output for negative values.
<> 140:97feb9bacc10 6131 */
<> 140:97feb9bacc10 6132 arm_status arm_sqrt_q31(
<> 140:97feb9bacc10 6133 q31_t in,
<> 140:97feb9bacc10 6134 q31_t * pOut);
<> 140:97feb9bacc10 6135
<> 140:97feb9bacc10 6136 /**
<> 140:97feb9bacc10 6137 * @brief Q15 square root function.
<> 140:97feb9bacc10 6138 * @param[in] in input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF.
<> 140:97feb9bacc10 6139 * @param[out] *pOut square root of input value.
<> 140:97feb9bacc10 6140 * @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if
<> 140:97feb9bacc10 6141 * <code>in</code> is negative value and returns zero output for negative values.
<> 140:97feb9bacc10 6142 */
<> 140:97feb9bacc10 6143 arm_status arm_sqrt_q15(
<> 140:97feb9bacc10 6144 q15_t in,
<> 140:97feb9bacc10 6145 q15_t * pOut);
<> 140:97feb9bacc10 6146
<> 140:97feb9bacc10 6147 /**
<> 140:97feb9bacc10 6148 * @} end of SQRT group
<> 140:97feb9bacc10 6149 */
<> 140:97feb9bacc10 6150
<> 140:97feb9bacc10 6151
<> 140:97feb9bacc10 6152
<> 140:97feb9bacc10 6153
<> 140:97feb9bacc10 6154
<> 140:97feb9bacc10 6155
<> 140:97feb9bacc10 6156 /**
<> 140:97feb9bacc10 6157 * @brief floating-point Circular write function.
<> 140:97feb9bacc10 6158 */
<> 140:97feb9bacc10 6159
<> 140:97feb9bacc10 6160 static __INLINE void arm_circularWrite_f32(
<> 140:97feb9bacc10 6161 int32_t * circBuffer,
<> 140:97feb9bacc10 6162 int32_t L,
<> 140:97feb9bacc10 6163 uint16_t * writeOffset,
<> 140:97feb9bacc10 6164 int32_t bufferInc,
<> 140:97feb9bacc10 6165 const int32_t * src,
<> 140:97feb9bacc10 6166 int32_t srcInc,
<> 140:97feb9bacc10 6167 uint32_t blockSize)
<> 140:97feb9bacc10 6168 {
<> 140:97feb9bacc10 6169 uint32_t i = 0u;
<> 140:97feb9bacc10 6170 int32_t wOffset;
<> 140:97feb9bacc10 6171
<> 140:97feb9bacc10 6172 /* Copy the value of Index pointer that points
<> 140:97feb9bacc10 6173 * to the current location where the input samples to be copied */
<> 140:97feb9bacc10 6174 wOffset = *writeOffset;
<> 140:97feb9bacc10 6175
<> 140:97feb9bacc10 6176 /* Loop over the blockSize */
<> 140:97feb9bacc10 6177 i = blockSize;
<> 140:97feb9bacc10 6178
<> 140:97feb9bacc10 6179 while(i > 0u)
<> 140:97feb9bacc10 6180 {
<> 140:97feb9bacc10 6181 /* copy the input sample to the circular buffer */
<> 140:97feb9bacc10 6182 circBuffer[wOffset] = *src;
<> 140:97feb9bacc10 6183
<> 140:97feb9bacc10 6184 /* Update the input pointer */
<> 140:97feb9bacc10 6185 src += srcInc;
<> 140:97feb9bacc10 6186
<> 140:97feb9bacc10 6187 /* Circularly update wOffset. Watch out for positive and negative value */
<> 140:97feb9bacc10 6188 wOffset += bufferInc;
<> 140:97feb9bacc10 6189 if(wOffset >= L)
<> 140:97feb9bacc10 6190 wOffset -= L;
<> 140:97feb9bacc10 6191
<> 140:97feb9bacc10 6192 /* Decrement the loop counter */
<> 140:97feb9bacc10 6193 i--;
<> 140:97feb9bacc10 6194 }
<> 140:97feb9bacc10 6195
<> 140:97feb9bacc10 6196 /* Update the index pointer */
<> 140:97feb9bacc10 6197 *writeOffset = wOffset;
<> 140:97feb9bacc10 6198 }
<> 140:97feb9bacc10 6199
<> 140:97feb9bacc10 6200
<> 140:97feb9bacc10 6201
<> 140:97feb9bacc10 6202 /**
<> 140:97feb9bacc10 6203 * @brief floating-point Circular Read function.
<> 140:97feb9bacc10 6204 */
<> 140:97feb9bacc10 6205 static __INLINE void arm_circularRead_f32(
<> 140:97feb9bacc10 6206 int32_t * circBuffer,
<> 140:97feb9bacc10 6207 int32_t L,
<> 140:97feb9bacc10 6208 int32_t * readOffset,
<> 140:97feb9bacc10 6209 int32_t bufferInc,
<> 140:97feb9bacc10 6210 int32_t * dst,
<> 140:97feb9bacc10 6211 int32_t * dst_base,
<> 140:97feb9bacc10 6212 int32_t dst_length,
<> 140:97feb9bacc10 6213 int32_t dstInc,
<> 140:97feb9bacc10 6214 uint32_t blockSize)
<> 140:97feb9bacc10 6215 {
<> 140:97feb9bacc10 6216 uint32_t i = 0u;
<> 140:97feb9bacc10 6217 int32_t rOffset, dst_end;
<> 140:97feb9bacc10 6218
<> 140:97feb9bacc10 6219 /* Copy the value of Index pointer that points
<> 140:97feb9bacc10 6220 * to the current location from where the input samples to be read */
<> 140:97feb9bacc10 6221 rOffset = *readOffset;
<> 140:97feb9bacc10 6222 dst_end = (int32_t) (dst_base + dst_length);
<> 140:97feb9bacc10 6223
<> 140:97feb9bacc10 6224 /* Loop over the blockSize */
<> 140:97feb9bacc10 6225 i = blockSize;
<> 140:97feb9bacc10 6226
<> 140:97feb9bacc10 6227 while(i > 0u)
<> 140:97feb9bacc10 6228 {
<> 140:97feb9bacc10 6229 /* copy the sample from the circular buffer to the destination buffer */
<> 140:97feb9bacc10 6230 *dst = circBuffer[rOffset];
<> 140:97feb9bacc10 6231
<> 140:97feb9bacc10 6232 /* Update the input pointer */
<> 140:97feb9bacc10 6233 dst += dstInc;
<> 140:97feb9bacc10 6234
<> 140:97feb9bacc10 6235 if(dst == (int32_t *) dst_end)
<> 140:97feb9bacc10 6236 {
<> 140:97feb9bacc10 6237 dst = dst_base;
<> 140:97feb9bacc10 6238 }
<> 140:97feb9bacc10 6239
<> 140:97feb9bacc10 6240 /* Circularly update rOffset. Watch out for positive and negative value */
<> 140:97feb9bacc10 6241 rOffset += bufferInc;
<> 140:97feb9bacc10 6242
<> 140:97feb9bacc10 6243 if(rOffset >= L)
<> 140:97feb9bacc10 6244 {
<> 140:97feb9bacc10 6245 rOffset -= L;
<> 140:97feb9bacc10 6246 }
<> 140:97feb9bacc10 6247
<> 140:97feb9bacc10 6248 /* Decrement the loop counter */
<> 140:97feb9bacc10 6249 i--;
<> 140:97feb9bacc10 6250 }
<> 140:97feb9bacc10 6251
<> 140:97feb9bacc10 6252 /* Update the index pointer */
<> 140:97feb9bacc10 6253 *readOffset = rOffset;
<> 140:97feb9bacc10 6254 }
<> 140:97feb9bacc10 6255
<> 140:97feb9bacc10 6256 /**
<> 140:97feb9bacc10 6257 * @brief Q15 Circular write function.
<> 140:97feb9bacc10 6258 */
<> 140:97feb9bacc10 6259
<> 140:97feb9bacc10 6260 static __INLINE void arm_circularWrite_q15(
<> 140:97feb9bacc10 6261 q15_t * circBuffer,
<> 140:97feb9bacc10 6262 int32_t L,
<> 140:97feb9bacc10 6263 uint16_t * writeOffset,
<> 140:97feb9bacc10 6264 int32_t bufferInc,
<> 140:97feb9bacc10 6265 const q15_t * src,
<> 140:97feb9bacc10 6266 int32_t srcInc,
<> 140:97feb9bacc10 6267 uint32_t blockSize)
<> 140:97feb9bacc10 6268 {
<> 140:97feb9bacc10 6269 uint32_t i = 0u;
<> 140:97feb9bacc10 6270 int32_t wOffset;
<> 140:97feb9bacc10 6271
<> 140:97feb9bacc10 6272 /* Copy the value of Index pointer that points
<> 140:97feb9bacc10 6273 * to the current location where the input samples to be copied */
<> 140:97feb9bacc10 6274 wOffset = *writeOffset;
<> 140:97feb9bacc10 6275
<> 140:97feb9bacc10 6276 /* Loop over the blockSize */
<> 140:97feb9bacc10 6277 i = blockSize;
<> 140:97feb9bacc10 6278
<> 140:97feb9bacc10 6279 while(i > 0u)
<> 140:97feb9bacc10 6280 {
<> 140:97feb9bacc10 6281 /* copy the input sample to the circular buffer */
<> 140:97feb9bacc10 6282 circBuffer[wOffset] = *src;
<> 140:97feb9bacc10 6283
<> 140:97feb9bacc10 6284 /* Update the input pointer */
<> 140:97feb9bacc10 6285 src += srcInc;
<> 140:97feb9bacc10 6286
<> 140:97feb9bacc10 6287 /* Circularly update wOffset. Watch out for positive and negative value */
<> 140:97feb9bacc10 6288 wOffset += bufferInc;
<> 140:97feb9bacc10 6289 if(wOffset >= L)
<> 140:97feb9bacc10 6290 wOffset -= L;
<> 140:97feb9bacc10 6291
<> 140:97feb9bacc10 6292 /* Decrement the loop counter */
<> 140:97feb9bacc10 6293 i--;
<> 140:97feb9bacc10 6294 }
<> 140:97feb9bacc10 6295
<> 140:97feb9bacc10 6296 /* Update the index pointer */
<> 140:97feb9bacc10 6297 *writeOffset = wOffset;
<> 140:97feb9bacc10 6298 }
<> 140:97feb9bacc10 6299
<> 140:97feb9bacc10 6300
<> 140:97feb9bacc10 6301
<> 140:97feb9bacc10 6302 /**
<> 140:97feb9bacc10 6303 * @brief Q15 Circular Read function.
<> 140:97feb9bacc10 6304 */
<> 140:97feb9bacc10 6305 static __INLINE void arm_circularRead_q15(
<> 140:97feb9bacc10 6306 q15_t * circBuffer,
<> 140:97feb9bacc10 6307 int32_t L,
<> 140:97feb9bacc10 6308 int32_t * readOffset,
<> 140:97feb9bacc10 6309 int32_t bufferInc,
<> 140:97feb9bacc10 6310 q15_t * dst,
<> 140:97feb9bacc10 6311 q15_t * dst_base,
<> 140:97feb9bacc10 6312 int32_t dst_length,
<> 140:97feb9bacc10 6313 int32_t dstInc,
<> 140:97feb9bacc10 6314 uint32_t blockSize)
<> 140:97feb9bacc10 6315 {
<> 140:97feb9bacc10 6316 uint32_t i = 0;
<> 140:97feb9bacc10 6317 int32_t rOffset, dst_end;
<> 140:97feb9bacc10 6318
<> 140:97feb9bacc10 6319 /* Copy the value of Index pointer that points
<> 140:97feb9bacc10 6320 * to the current location from where the input samples to be read */
<> 140:97feb9bacc10 6321 rOffset = *readOffset;
<> 140:97feb9bacc10 6322
<> 140:97feb9bacc10 6323 dst_end = (int32_t) (dst_base + dst_length);
<> 140:97feb9bacc10 6324
<> 140:97feb9bacc10 6325 /* Loop over the blockSize */
<> 140:97feb9bacc10 6326 i = blockSize;
<> 140:97feb9bacc10 6327
<> 140:97feb9bacc10 6328 while(i > 0u)
<> 140:97feb9bacc10 6329 {
<> 140:97feb9bacc10 6330 /* copy the sample from the circular buffer to the destination buffer */
<> 140:97feb9bacc10 6331 *dst = circBuffer[rOffset];
<> 140:97feb9bacc10 6332
<> 140:97feb9bacc10 6333 /* Update the input pointer */
<> 140:97feb9bacc10 6334 dst += dstInc;
<> 140:97feb9bacc10 6335
<> 140:97feb9bacc10 6336 if(dst == (q15_t *) dst_end)
<> 140:97feb9bacc10 6337 {
<> 140:97feb9bacc10 6338 dst = dst_base;
<> 140:97feb9bacc10 6339 }
<> 140:97feb9bacc10 6340
<> 140:97feb9bacc10 6341 /* Circularly update wOffset. Watch out for positive and negative value */
<> 140:97feb9bacc10 6342 rOffset += bufferInc;
<> 140:97feb9bacc10 6343
<> 140:97feb9bacc10 6344 if(rOffset >= L)
<> 140:97feb9bacc10 6345 {
<> 140:97feb9bacc10 6346 rOffset -= L;
<> 140:97feb9bacc10 6347 }
<> 140:97feb9bacc10 6348
<> 140:97feb9bacc10 6349 /* Decrement the loop counter */
<> 140:97feb9bacc10 6350 i--;
<> 140:97feb9bacc10 6351 }
<> 140:97feb9bacc10 6352
<> 140:97feb9bacc10 6353 /* Update the index pointer */
<> 140:97feb9bacc10 6354 *readOffset = rOffset;
<> 140:97feb9bacc10 6355 }
<> 140:97feb9bacc10 6356
<> 140:97feb9bacc10 6357
<> 140:97feb9bacc10 6358 /**
<> 140:97feb9bacc10 6359 * @brief Q7 Circular write function.
<> 140:97feb9bacc10 6360 */
<> 140:97feb9bacc10 6361
<> 140:97feb9bacc10 6362 static __INLINE void arm_circularWrite_q7(
<> 140:97feb9bacc10 6363 q7_t * circBuffer,
<> 140:97feb9bacc10 6364 int32_t L,
<> 140:97feb9bacc10 6365 uint16_t * writeOffset,
<> 140:97feb9bacc10 6366 int32_t bufferInc,
<> 140:97feb9bacc10 6367 const q7_t * src,
<> 140:97feb9bacc10 6368 int32_t srcInc,
<> 140:97feb9bacc10 6369 uint32_t blockSize)
<> 140:97feb9bacc10 6370 {
<> 140:97feb9bacc10 6371 uint32_t i = 0u;
<> 140:97feb9bacc10 6372 int32_t wOffset;
<> 140:97feb9bacc10 6373
<> 140:97feb9bacc10 6374 /* Copy the value of Index pointer that points
<> 140:97feb9bacc10 6375 * to the current location where the input samples to be copied */
<> 140:97feb9bacc10 6376 wOffset = *writeOffset;
<> 140:97feb9bacc10 6377
<> 140:97feb9bacc10 6378 /* Loop over the blockSize */
<> 140:97feb9bacc10 6379 i = blockSize;
<> 140:97feb9bacc10 6380
<> 140:97feb9bacc10 6381 while(i > 0u)
<> 140:97feb9bacc10 6382 {
<> 140:97feb9bacc10 6383 /* copy the input sample to the circular buffer */
<> 140:97feb9bacc10 6384 circBuffer[wOffset] = *src;
<> 140:97feb9bacc10 6385
<> 140:97feb9bacc10 6386 /* Update the input pointer */
<> 140:97feb9bacc10 6387 src += srcInc;
<> 140:97feb9bacc10 6388
<> 140:97feb9bacc10 6389 /* Circularly update wOffset. Watch out for positive and negative value */
<> 140:97feb9bacc10 6390 wOffset += bufferInc;
<> 140:97feb9bacc10 6391 if(wOffset >= L)
<> 140:97feb9bacc10 6392 wOffset -= L;
<> 140:97feb9bacc10 6393
<> 140:97feb9bacc10 6394 /* Decrement the loop counter */
<> 140:97feb9bacc10 6395 i--;
<> 140:97feb9bacc10 6396 }
<> 140:97feb9bacc10 6397
<> 140:97feb9bacc10 6398 /* Update the index pointer */
<> 140:97feb9bacc10 6399 *writeOffset = wOffset;
<> 140:97feb9bacc10 6400 }
<> 140:97feb9bacc10 6401
<> 140:97feb9bacc10 6402
<> 140:97feb9bacc10 6403
<> 140:97feb9bacc10 6404 /**
<> 140:97feb9bacc10 6405 * @brief Q7 Circular Read function.
<> 140:97feb9bacc10 6406 */
<> 140:97feb9bacc10 6407 static __INLINE void arm_circularRead_q7(
<> 140:97feb9bacc10 6408 q7_t * circBuffer,
<> 140:97feb9bacc10 6409 int32_t L,
<> 140:97feb9bacc10 6410 int32_t * readOffset,
<> 140:97feb9bacc10 6411 int32_t bufferInc,
<> 140:97feb9bacc10 6412 q7_t * dst,
<> 140:97feb9bacc10 6413 q7_t * dst_base,
<> 140:97feb9bacc10 6414 int32_t dst_length,
<> 140:97feb9bacc10 6415 int32_t dstInc,
<> 140:97feb9bacc10 6416 uint32_t blockSize)
<> 140:97feb9bacc10 6417 {
<> 140:97feb9bacc10 6418 uint32_t i = 0;
<> 140:97feb9bacc10 6419 int32_t rOffset, dst_end;
<> 140:97feb9bacc10 6420
<> 140:97feb9bacc10 6421 /* Copy the value of Index pointer that points
<> 140:97feb9bacc10 6422 * to the current location from where the input samples to be read */
<> 140:97feb9bacc10 6423 rOffset = *readOffset;
<> 140:97feb9bacc10 6424
<> 140:97feb9bacc10 6425 dst_end = (int32_t) (dst_base + dst_length);
<> 140:97feb9bacc10 6426
<> 140:97feb9bacc10 6427 /* Loop over the blockSize */
<> 140:97feb9bacc10 6428 i = blockSize;
<> 140:97feb9bacc10 6429
<> 140:97feb9bacc10 6430 while(i > 0u)
<> 140:97feb9bacc10 6431 {
<> 140:97feb9bacc10 6432 /* copy the sample from the circular buffer to the destination buffer */
<> 140:97feb9bacc10 6433 *dst = circBuffer[rOffset];
<> 140:97feb9bacc10 6434
<> 140:97feb9bacc10 6435 /* Update the input pointer */
<> 140:97feb9bacc10 6436 dst += dstInc;
<> 140:97feb9bacc10 6437
<> 140:97feb9bacc10 6438 if(dst == (q7_t *) dst_end)
<> 140:97feb9bacc10 6439 {
<> 140:97feb9bacc10 6440 dst = dst_base;
<> 140:97feb9bacc10 6441 }
<> 140:97feb9bacc10 6442
<> 140:97feb9bacc10 6443 /* Circularly update rOffset. Watch out for positive and negative value */
<> 140:97feb9bacc10 6444 rOffset += bufferInc;
<> 140:97feb9bacc10 6445
<> 140:97feb9bacc10 6446 if(rOffset >= L)
<> 140:97feb9bacc10 6447 {
<> 140:97feb9bacc10 6448 rOffset -= L;
<> 140:97feb9bacc10 6449 }
<> 140:97feb9bacc10 6450
<> 140:97feb9bacc10 6451 /* Decrement the loop counter */
<> 140:97feb9bacc10 6452 i--;
<> 140:97feb9bacc10 6453 }
<> 140:97feb9bacc10 6454
<> 140:97feb9bacc10 6455 /* Update the index pointer */
<> 140:97feb9bacc10 6456 *readOffset = rOffset;
<> 140:97feb9bacc10 6457 }
<> 140:97feb9bacc10 6458
<> 140:97feb9bacc10 6459
<> 140:97feb9bacc10 6460 /**
<> 140:97feb9bacc10 6461 * @brief Sum of the squares of the elements of a Q31 vector.
<> 140:97feb9bacc10 6462 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6463 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6464 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6465 * @return none.
<> 140:97feb9bacc10 6466 */
<> 140:97feb9bacc10 6467
<> 140:97feb9bacc10 6468 void arm_power_q31(
<> 140:97feb9bacc10 6469 q31_t * pSrc,
<> 140:97feb9bacc10 6470 uint32_t blockSize,
<> 140:97feb9bacc10 6471 q63_t * pResult);
<> 140:97feb9bacc10 6472
<> 140:97feb9bacc10 6473 /**
<> 140:97feb9bacc10 6474 * @brief Sum of the squares of the elements of a floating-point vector.
<> 140:97feb9bacc10 6475 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6476 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6477 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6478 * @return none.
<> 140:97feb9bacc10 6479 */
<> 140:97feb9bacc10 6480
<> 140:97feb9bacc10 6481 void arm_power_f32(
<> 140:97feb9bacc10 6482 float32_t * pSrc,
<> 140:97feb9bacc10 6483 uint32_t blockSize,
<> 140:97feb9bacc10 6484 float32_t * pResult);
<> 140:97feb9bacc10 6485
<> 140:97feb9bacc10 6486 /**
<> 140:97feb9bacc10 6487 * @brief Sum of the squares of the elements of a Q15 vector.
<> 140:97feb9bacc10 6488 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6489 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6490 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6491 * @return none.
<> 140:97feb9bacc10 6492 */
<> 140:97feb9bacc10 6493
<> 140:97feb9bacc10 6494 void arm_power_q15(
<> 140:97feb9bacc10 6495 q15_t * pSrc,
<> 140:97feb9bacc10 6496 uint32_t blockSize,
<> 140:97feb9bacc10 6497 q63_t * pResult);
<> 140:97feb9bacc10 6498
<> 140:97feb9bacc10 6499 /**
<> 140:97feb9bacc10 6500 * @brief Sum of the squares of the elements of a Q7 vector.
<> 140:97feb9bacc10 6501 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6502 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6503 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6504 * @return none.
<> 140:97feb9bacc10 6505 */
<> 140:97feb9bacc10 6506
<> 140:97feb9bacc10 6507 void arm_power_q7(
<> 140:97feb9bacc10 6508 q7_t * pSrc,
<> 140:97feb9bacc10 6509 uint32_t blockSize,
<> 140:97feb9bacc10 6510 q31_t * pResult);
<> 140:97feb9bacc10 6511
<> 140:97feb9bacc10 6512 /**
<> 140:97feb9bacc10 6513 * @brief Mean value of a Q7 vector.
<> 140:97feb9bacc10 6514 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6515 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6516 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6517 * @return none.
<> 140:97feb9bacc10 6518 */
<> 140:97feb9bacc10 6519
<> 140:97feb9bacc10 6520 void arm_mean_q7(
<> 140:97feb9bacc10 6521 q7_t * pSrc,
<> 140:97feb9bacc10 6522 uint32_t blockSize,
<> 140:97feb9bacc10 6523 q7_t * pResult);
<> 140:97feb9bacc10 6524
<> 140:97feb9bacc10 6525 /**
<> 140:97feb9bacc10 6526 * @brief Mean value of a Q15 vector.
<> 140:97feb9bacc10 6527 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6528 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6529 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6530 * @return none.
<> 140:97feb9bacc10 6531 */
<> 140:97feb9bacc10 6532 void arm_mean_q15(
<> 140:97feb9bacc10 6533 q15_t * pSrc,
<> 140:97feb9bacc10 6534 uint32_t blockSize,
<> 140:97feb9bacc10 6535 q15_t * pResult);
<> 140:97feb9bacc10 6536
<> 140:97feb9bacc10 6537 /**
<> 140:97feb9bacc10 6538 * @brief Mean value of a Q31 vector.
<> 140:97feb9bacc10 6539 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6540 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6541 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6542 * @return none.
<> 140:97feb9bacc10 6543 */
<> 140:97feb9bacc10 6544 void arm_mean_q31(
<> 140:97feb9bacc10 6545 q31_t * pSrc,
<> 140:97feb9bacc10 6546 uint32_t blockSize,
<> 140:97feb9bacc10 6547 q31_t * pResult);
<> 140:97feb9bacc10 6548
<> 140:97feb9bacc10 6549 /**
<> 140:97feb9bacc10 6550 * @brief Mean value of a floating-point vector.
<> 140:97feb9bacc10 6551 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6552 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6553 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6554 * @return none.
<> 140:97feb9bacc10 6555 */
<> 140:97feb9bacc10 6556 void arm_mean_f32(
<> 140:97feb9bacc10 6557 float32_t * pSrc,
<> 140:97feb9bacc10 6558 uint32_t blockSize,
<> 140:97feb9bacc10 6559 float32_t * pResult);
<> 140:97feb9bacc10 6560
<> 140:97feb9bacc10 6561 /**
<> 140:97feb9bacc10 6562 * @brief Variance of the elements of a floating-point vector.
<> 140:97feb9bacc10 6563 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6564 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6565 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6566 * @return none.
<> 140:97feb9bacc10 6567 */
<> 140:97feb9bacc10 6568
<> 140:97feb9bacc10 6569 void arm_var_f32(
<> 140:97feb9bacc10 6570 float32_t * pSrc,
<> 140:97feb9bacc10 6571 uint32_t blockSize,
<> 140:97feb9bacc10 6572 float32_t * pResult);
<> 140:97feb9bacc10 6573
<> 140:97feb9bacc10 6574 /**
<> 140:97feb9bacc10 6575 * @brief Variance of the elements of a Q31 vector.
<> 140:97feb9bacc10 6576 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6577 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6578 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6579 * @return none.
<> 140:97feb9bacc10 6580 */
<> 140:97feb9bacc10 6581
<> 140:97feb9bacc10 6582 void arm_var_q31(
<> 140:97feb9bacc10 6583 q31_t * pSrc,
<> 140:97feb9bacc10 6584 uint32_t blockSize,
<> 140:97feb9bacc10 6585 q31_t * pResult);
<> 140:97feb9bacc10 6586
<> 140:97feb9bacc10 6587 /**
<> 140:97feb9bacc10 6588 * @brief Variance of the elements of a Q15 vector.
<> 140:97feb9bacc10 6589 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6590 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6591 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6592 * @return none.
<> 140:97feb9bacc10 6593 */
<> 140:97feb9bacc10 6594
<> 140:97feb9bacc10 6595 void arm_var_q15(
<> 140:97feb9bacc10 6596 q15_t * pSrc,
<> 140:97feb9bacc10 6597 uint32_t blockSize,
<> 140:97feb9bacc10 6598 q15_t * pResult);
<> 140:97feb9bacc10 6599
<> 140:97feb9bacc10 6600 /**
<> 140:97feb9bacc10 6601 * @brief Root Mean Square of the elements of a floating-point vector.
<> 140:97feb9bacc10 6602 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6603 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6604 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6605 * @return none.
<> 140:97feb9bacc10 6606 */
<> 140:97feb9bacc10 6607
<> 140:97feb9bacc10 6608 void arm_rms_f32(
<> 140:97feb9bacc10 6609 float32_t * pSrc,
<> 140:97feb9bacc10 6610 uint32_t blockSize,
<> 140:97feb9bacc10 6611 float32_t * pResult);
<> 140:97feb9bacc10 6612
<> 140:97feb9bacc10 6613 /**
<> 140:97feb9bacc10 6614 * @brief Root Mean Square of the elements of a Q31 vector.
<> 140:97feb9bacc10 6615 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6616 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6617 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6618 * @return none.
<> 140:97feb9bacc10 6619 */
<> 140:97feb9bacc10 6620
<> 140:97feb9bacc10 6621 void arm_rms_q31(
<> 140:97feb9bacc10 6622 q31_t * pSrc,
<> 140:97feb9bacc10 6623 uint32_t blockSize,
<> 140:97feb9bacc10 6624 q31_t * pResult);
<> 140:97feb9bacc10 6625
<> 140:97feb9bacc10 6626 /**
<> 140:97feb9bacc10 6627 * @brief Root Mean Square of the elements of a Q15 vector.
<> 140:97feb9bacc10 6628 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6629 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6630 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6631 * @return none.
<> 140:97feb9bacc10 6632 */
<> 140:97feb9bacc10 6633
<> 140:97feb9bacc10 6634 void arm_rms_q15(
<> 140:97feb9bacc10 6635 q15_t * pSrc,
<> 140:97feb9bacc10 6636 uint32_t blockSize,
<> 140:97feb9bacc10 6637 q15_t * pResult);
<> 140:97feb9bacc10 6638
<> 140:97feb9bacc10 6639 /**
<> 140:97feb9bacc10 6640 * @brief Standard deviation of the elements of a floating-point vector.
<> 140:97feb9bacc10 6641 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6642 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6643 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6644 * @return none.
<> 140:97feb9bacc10 6645 */
<> 140:97feb9bacc10 6646
<> 140:97feb9bacc10 6647 void arm_std_f32(
<> 140:97feb9bacc10 6648 float32_t * pSrc,
<> 140:97feb9bacc10 6649 uint32_t blockSize,
<> 140:97feb9bacc10 6650 float32_t * pResult);
<> 140:97feb9bacc10 6651
<> 140:97feb9bacc10 6652 /**
<> 140:97feb9bacc10 6653 * @brief Standard deviation of the elements of a Q31 vector.
<> 140:97feb9bacc10 6654 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6655 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6656 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6657 * @return none.
<> 140:97feb9bacc10 6658 */
<> 140:97feb9bacc10 6659
<> 140:97feb9bacc10 6660 void arm_std_q31(
<> 140:97feb9bacc10 6661 q31_t * pSrc,
<> 140:97feb9bacc10 6662 uint32_t blockSize,
<> 140:97feb9bacc10 6663 q31_t * pResult);
<> 140:97feb9bacc10 6664
<> 140:97feb9bacc10 6665 /**
<> 140:97feb9bacc10 6666 * @brief Standard deviation of the elements of a Q15 vector.
<> 140:97feb9bacc10 6667 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6668 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6669 * @param[out] *pResult is output value.
<> 140:97feb9bacc10 6670 * @return none.
<> 140:97feb9bacc10 6671 */
<> 140:97feb9bacc10 6672
<> 140:97feb9bacc10 6673 void arm_std_q15(
<> 140:97feb9bacc10 6674 q15_t * pSrc,
<> 140:97feb9bacc10 6675 uint32_t blockSize,
<> 140:97feb9bacc10 6676 q15_t * pResult);
<> 140:97feb9bacc10 6677
<> 140:97feb9bacc10 6678 /**
<> 140:97feb9bacc10 6679 * @brief Floating-point complex magnitude
<> 140:97feb9bacc10 6680 * @param[in] *pSrc points to the complex input vector
<> 140:97feb9bacc10 6681 * @param[out] *pDst points to the real output vector
<> 140:97feb9bacc10 6682 * @param[in] numSamples number of complex samples in the input vector
<> 140:97feb9bacc10 6683 * @return none.
<> 140:97feb9bacc10 6684 */
<> 140:97feb9bacc10 6685
<> 140:97feb9bacc10 6686 void arm_cmplx_mag_f32(
<> 140:97feb9bacc10 6687 float32_t * pSrc,
<> 140:97feb9bacc10 6688 float32_t * pDst,
<> 140:97feb9bacc10 6689 uint32_t numSamples);
<> 140:97feb9bacc10 6690
<> 140:97feb9bacc10 6691 /**
<> 140:97feb9bacc10 6692 * @brief Q31 complex magnitude
<> 140:97feb9bacc10 6693 * @param[in] *pSrc points to the complex input vector
<> 140:97feb9bacc10 6694 * @param[out] *pDst points to the real output vector
<> 140:97feb9bacc10 6695 * @param[in] numSamples number of complex samples in the input vector
<> 140:97feb9bacc10 6696 * @return none.
<> 140:97feb9bacc10 6697 */
<> 140:97feb9bacc10 6698
<> 140:97feb9bacc10 6699 void arm_cmplx_mag_q31(
<> 140:97feb9bacc10 6700 q31_t * pSrc,
<> 140:97feb9bacc10 6701 q31_t * pDst,
<> 140:97feb9bacc10 6702 uint32_t numSamples);
<> 140:97feb9bacc10 6703
<> 140:97feb9bacc10 6704 /**
<> 140:97feb9bacc10 6705 * @brief Q15 complex magnitude
<> 140:97feb9bacc10 6706 * @param[in] *pSrc points to the complex input vector
<> 140:97feb9bacc10 6707 * @param[out] *pDst points to the real output vector
<> 140:97feb9bacc10 6708 * @param[in] numSamples number of complex samples in the input vector
<> 140:97feb9bacc10 6709 * @return none.
<> 140:97feb9bacc10 6710 */
<> 140:97feb9bacc10 6711
<> 140:97feb9bacc10 6712 void arm_cmplx_mag_q15(
<> 140:97feb9bacc10 6713 q15_t * pSrc,
<> 140:97feb9bacc10 6714 q15_t * pDst,
<> 140:97feb9bacc10 6715 uint32_t numSamples);
<> 140:97feb9bacc10 6716
<> 140:97feb9bacc10 6717 /**
<> 140:97feb9bacc10 6718 * @brief Q15 complex dot product
<> 140:97feb9bacc10 6719 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 6720 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 6721 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 6722 * @param[out] *realResult real part of the result returned here
<> 140:97feb9bacc10 6723 * @param[out] *imagResult imaginary part of the result returned here
<> 140:97feb9bacc10 6724 * @return none.
<> 140:97feb9bacc10 6725 */
<> 140:97feb9bacc10 6726
<> 140:97feb9bacc10 6727 void arm_cmplx_dot_prod_q15(
<> 140:97feb9bacc10 6728 q15_t * pSrcA,
<> 140:97feb9bacc10 6729 q15_t * pSrcB,
<> 140:97feb9bacc10 6730 uint32_t numSamples,
<> 140:97feb9bacc10 6731 q31_t * realResult,
<> 140:97feb9bacc10 6732 q31_t * imagResult);
<> 140:97feb9bacc10 6733
<> 140:97feb9bacc10 6734 /**
<> 140:97feb9bacc10 6735 * @brief Q31 complex dot product
<> 140:97feb9bacc10 6736 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 6737 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 6738 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 6739 * @param[out] *realResult real part of the result returned here
<> 140:97feb9bacc10 6740 * @param[out] *imagResult imaginary part of the result returned here
<> 140:97feb9bacc10 6741 * @return none.
<> 140:97feb9bacc10 6742 */
<> 140:97feb9bacc10 6743
<> 140:97feb9bacc10 6744 void arm_cmplx_dot_prod_q31(
<> 140:97feb9bacc10 6745 q31_t * pSrcA,
<> 140:97feb9bacc10 6746 q31_t * pSrcB,
<> 140:97feb9bacc10 6747 uint32_t numSamples,
<> 140:97feb9bacc10 6748 q63_t * realResult,
<> 140:97feb9bacc10 6749 q63_t * imagResult);
<> 140:97feb9bacc10 6750
<> 140:97feb9bacc10 6751 /**
<> 140:97feb9bacc10 6752 * @brief Floating-point complex dot product
<> 140:97feb9bacc10 6753 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 6754 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 6755 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 6756 * @param[out] *realResult real part of the result returned here
<> 140:97feb9bacc10 6757 * @param[out] *imagResult imaginary part of the result returned here
<> 140:97feb9bacc10 6758 * @return none.
<> 140:97feb9bacc10 6759 */
<> 140:97feb9bacc10 6760
<> 140:97feb9bacc10 6761 void arm_cmplx_dot_prod_f32(
<> 140:97feb9bacc10 6762 float32_t * pSrcA,
<> 140:97feb9bacc10 6763 float32_t * pSrcB,
<> 140:97feb9bacc10 6764 uint32_t numSamples,
<> 140:97feb9bacc10 6765 float32_t * realResult,
<> 140:97feb9bacc10 6766 float32_t * imagResult);
<> 140:97feb9bacc10 6767
<> 140:97feb9bacc10 6768 /**
<> 140:97feb9bacc10 6769 * @brief Q15 complex-by-real multiplication
<> 140:97feb9bacc10 6770 * @param[in] *pSrcCmplx points to the complex input vector
<> 140:97feb9bacc10 6771 * @param[in] *pSrcReal points to the real input vector
<> 140:97feb9bacc10 6772 * @param[out] *pCmplxDst points to the complex output vector
<> 140:97feb9bacc10 6773 * @param[in] numSamples number of samples in each vector
<> 140:97feb9bacc10 6774 * @return none.
<> 140:97feb9bacc10 6775 */
<> 140:97feb9bacc10 6776
<> 140:97feb9bacc10 6777 void arm_cmplx_mult_real_q15(
<> 140:97feb9bacc10 6778 q15_t * pSrcCmplx,
<> 140:97feb9bacc10 6779 q15_t * pSrcReal,
<> 140:97feb9bacc10 6780 q15_t * pCmplxDst,
<> 140:97feb9bacc10 6781 uint32_t numSamples);
<> 140:97feb9bacc10 6782
<> 140:97feb9bacc10 6783 /**
<> 140:97feb9bacc10 6784 * @brief Q31 complex-by-real multiplication
<> 140:97feb9bacc10 6785 * @param[in] *pSrcCmplx points to the complex input vector
<> 140:97feb9bacc10 6786 * @param[in] *pSrcReal points to the real input vector
<> 140:97feb9bacc10 6787 * @param[out] *pCmplxDst points to the complex output vector
<> 140:97feb9bacc10 6788 * @param[in] numSamples number of samples in each vector
<> 140:97feb9bacc10 6789 * @return none.
<> 140:97feb9bacc10 6790 */
<> 140:97feb9bacc10 6791
<> 140:97feb9bacc10 6792 void arm_cmplx_mult_real_q31(
<> 140:97feb9bacc10 6793 q31_t * pSrcCmplx,
<> 140:97feb9bacc10 6794 q31_t * pSrcReal,
<> 140:97feb9bacc10 6795 q31_t * pCmplxDst,
<> 140:97feb9bacc10 6796 uint32_t numSamples);
<> 140:97feb9bacc10 6797
<> 140:97feb9bacc10 6798 /**
<> 140:97feb9bacc10 6799 * @brief Floating-point complex-by-real multiplication
<> 140:97feb9bacc10 6800 * @param[in] *pSrcCmplx points to the complex input vector
<> 140:97feb9bacc10 6801 * @param[in] *pSrcReal points to the real input vector
<> 140:97feb9bacc10 6802 * @param[out] *pCmplxDst points to the complex output vector
<> 140:97feb9bacc10 6803 * @param[in] numSamples number of samples in each vector
<> 140:97feb9bacc10 6804 * @return none.
<> 140:97feb9bacc10 6805 */
<> 140:97feb9bacc10 6806
<> 140:97feb9bacc10 6807 void arm_cmplx_mult_real_f32(
<> 140:97feb9bacc10 6808 float32_t * pSrcCmplx,
<> 140:97feb9bacc10 6809 float32_t * pSrcReal,
<> 140:97feb9bacc10 6810 float32_t * pCmplxDst,
<> 140:97feb9bacc10 6811 uint32_t numSamples);
<> 140:97feb9bacc10 6812
<> 140:97feb9bacc10 6813 /**
<> 140:97feb9bacc10 6814 * @brief Minimum value of a Q7 vector.
<> 140:97feb9bacc10 6815 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6816 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6817 * @param[out] *result is output pointer
<> 140:97feb9bacc10 6818 * @param[in] index is the array index of the minimum value in the input buffer.
<> 140:97feb9bacc10 6819 * @return none.
<> 140:97feb9bacc10 6820 */
<> 140:97feb9bacc10 6821
<> 140:97feb9bacc10 6822 void arm_min_q7(
<> 140:97feb9bacc10 6823 q7_t * pSrc,
<> 140:97feb9bacc10 6824 uint32_t blockSize,
<> 140:97feb9bacc10 6825 q7_t * result,
<> 140:97feb9bacc10 6826 uint32_t * index);
<> 140:97feb9bacc10 6827
<> 140:97feb9bacc10 6828 /**
<> 140:97feb9bacc10 6829 * @brief Minimum value of a Q15 vector.
<> 140:97feb9bacc10 6830 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6831 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6832 * @param[out] *pResult is output pointer
<> 140:97feb9bacc10 6833 * @param[in] *pIndex is the array index of the minimum value in the input buffer.
<> 140:97feb9bacc10 6834 * @return none.
<> 140:97feb9bacc10 6835 */
<> 140:97feb9bacc10 6836
<> 140:97feb9bacc10 6837 void arm_min_q15(
<> 140:97feb9bacc10 6838 q15_t * pSrc,
<> 140:97feb9bacc10 6839 uint32_t blockSize,
<> 140:97feb9bacc10 6840 q15_t * pResult,
<> 140:97feb9bacc10 6841 uint32_t * pIndex);
<> 140:97feb9bacc10 6842
<> 140:97feb9bacc10 6843 /**
<> 140:97feb9bacc10 6844 * @brief Minimum value of a Q31 vector.
<> 140:97feb9bacc10 6845 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6846 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6847 * @param[out] *pResult is output pointer
<> 140:97feb9bacc10 6848 * @param[out] *pIndex is the array index of the minimum value in the input buffer.
<> 140:97feb9bacc10 6849 * @return none.
<> 140:97feb9bacc10 6850 */
<> 140:97feb9bacc10 6851 void arm_min_q31(
<> 140:97feb9bacc10 6852 q31_t * pSrc,
<> 140:97feb9bacc10 6853 uint32_t blockSize,
<> 140:97feb9bacc10 6854 q31_t * pResult,
<> 140:97feb9bacc10 6855 uint32_t * pIndex);
<> 140:97feb9bacc10 6856
<> 140:97feb9bacc10 6857 /**
<> 140:97feb9bacc10 6858 * @brief Minimum value of a floating-point vector.
<> 140:97feb9bacc10 6859 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 6860 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 6861 * @param[out] *pResult is output pointer
<> 140:97feb9bacc10 6862 * @param[out] *pIndex is the array index of the minimum value in the input buffer.
<> 140:97feb9bacc10 6863 * @return none.
<> 140:97feb9bacc10 6864 */
<> 140:97feb9bacc10 6865
<> 140:97feb9bacc10 6866 void arm_min_f32(
<> 140:97feb9bacc10 6867 float32_t * pSrc,
<> 140:97feb9bacc10 6868 uint32_t blockSize,
<> 140:97feb9bacc10 6869 float32_t * pResult,
<> 140:97feb9bacc10 6870 uint32_t * pIndex);
<> 140:97feb9bacc10 6871
<> 140:97feb9bacc10 6872 /**
<> 140:97feb9bacc10 6873 * @brief Maximum value of a Q7 vector.
<> 140:97feb9bacc10 6874 * @param[in] *pSrc points to the input buffer
<> 140:97feb9bacc10 6875 * @param[in] blockSize length of the input vector
<> 140:97feb9bacc10 6876 * @param[out] *pResult maximum value returned here
<> 140:97feb9bacc10 6877 * @param[out] *pIndex index of maximum value returned here
<> 140:97feb9bacc10 6878 * @return none.
<> 140:97feb9bacc10 6879 */
<> 140:97feb9bacc10 6880
<> 140:97feb9bacc10 6881 void arm_max_q7(
<> 140:97feb9bacc10 6882 q7_t * pSrc,
<> 140:97feb9bacc10 6883 uint32_t blockSize,
<> 140:97feb9bacc10 6884 q7_t * pResult,
<> 140:97feb9bacc10 6885 uint32_t * pIndex);
<> 140:97feb9bacc10 6886
<> 140:97feb9bacc10 6887 /**
<> 140:97feb9bacc10 6888 * @brief Maximum value of a Q15 vector.
<> 140:97feb9bacc10 6889 * @param[in] *pSrc points to the input buffer
<> 140:97feb9bacc10 6890 * @param[in] blockSize length of the input vector
<> 140:97feb9bacc10 6891 * @param[out] *pResult maximum value returned here
<> 140:97feb9bacc10 6892 * @param[out] *pIndex index of maximum value returned here
<> 140:97feb9bacc10 6893 * @return none.
<> 140:97feb9bacc10 6894 */
<> 140:97feb9bacc10 6895
<> 140:97feb9bacc10 6896 void arm_max_q15(
<> 140:97feb9bacc10 6897 q15_t * pSrc,
<> 140:97feb9bacc10 6898 uint32_t blockSize,
<> 140:97feb9bacc10 6899 q15_t * pResult,
<> 140:97feb9bacc10 6900 uint32_t * pIndex);
<> 140:97feb9bacc10 6901
<> 140:97feb9bacc10 6902 /**
<> 140:97feb9bacc10 6903 * @brief Maximum value of a Q31 vector.
<> 140:97feb9bacc10 6904 * @param[in] *pSrc points to the input buffer
<> 140:97feb9bacc10 6905 * @param[in] blockSize length of the input vector
<> 140:97feb9bacc10 6906 * @param[out] *pResult maximum value returned here
<> 140:97feb9bacc10 6907 * @param[out] *pIndex index of maximum value returned here
<> 140:97feb9bacc10 6908 * @return none.
<> 140:97feb9bacc10 6909 */
<> 140:97feb9bacc10 6910
<> 140:97feb9bacc10 6911 void arm_max_q31(
<> 140:97feb9bacc10 6912 q31_t * pSrc,
<> 140:97feb9bacc10 6913 uint32_t blockSize,
<> 140:97feb9bacc10 6914 q31_t * pResult,
<> 140:97feb9bacc10 6915 uint32_t * pIndex);
<> 140:97feb9bacc10 6916
<> 140:97feb9bacc10 6917 /**
<> 140:97feb9bacc10 6918 * @brief Maximum value of a floating-point vector.
<> 140:97feb9bacc10 6919 * @param[in] *pSrc points to the input buffer
<> 140:97feb9bacc10 6920 * @param[in] blockSize length of the input vector
<> 140:97feb9bacc10 6921 * @param[out] *pResult maximum value returned here
<> 140:97feb9bacc10 6922 * @param[out] *pIndex index of maximum value returned here
<> 140:97feb9bacc10 6923 * @return none.
<> 140:97feb9bacc10 6924 */
<> 140:97feb9bacc10 6925
<> 140:97feb9bacc10 6926 void arm_max_f32(
<> 140:97feb9bacc10 6927 float32_t * pSrc,
<> 140:97feb9bacc10 6928 uint32_t blockSize,
<> 140:97feb9bacc10 6929 float32_t * pResult,
<> 140:97feb9bacc10 6930 uint32_t * pIndex);
<> 140:97feb9bacc10 6931
<> 140:97feb9bacc10 6932 /**
<> 140:97feb9bacc10 6933 * @brief Q15 complex-by-complex multiplication
<> 140:97feb9bacc10 6934 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 6935 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 6936 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 6937 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 6938 * @return none.
<> 140:97feb9bacc10 6939 */
<> 140:97feb9bacc10 6940
<> 140:97feb9bacc10 6941 void arm_cmplx_mult_cmplx_q15(
<> 140:97feb9bacc10 6942 q15_t * pSrcA,
<> 140:97feb9bacc10 6943 q15_t * pSrcB,
<> 140:97feb9bacc10 6944 q15_t * pDst,
<> 140:97feb9bacc10 6945 uint32_t numSamples);
<> 140:97feb9bacc10 6946
<> 140:97feb9bacc10 6947 /**
<> 140:97feb9bacc10 6948 * @brief Q31 complex-by-complex multiplication
<> 140:97feb9bacc10 6949 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 6950 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 6951 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 6952 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 6953 * @return none.
<> 140:97feb9bacc10 6954 */
<> 140:97feb9bacc10 6955
<> 140:97feb9bacc10 6956 void arm_cmplx_mult_cmplx_q31(
<> 140:97feb9bacc10 6957 q31_t * pSrcA,
<> 140:97feb9bacc10 6958 q31_t * pSrcB,
<> 140:97feb9bacc10 6959 q31_t * pDst,
<> 140:97feb9bacc10 6960 uint32_t numSamples);
<> 140:97feb9bacc10 6961
<> 140:97feb9bacc10 6962 /**
<> 140:97feb9bacc10 6963 * @brief Floating-point complex-by-complex multiplication
<> 140:97feb9bacc10 6964 * @param[in] *pSrcA points to the first input vector
<> 140:97feb9bacc10 6965 * @param[in] *pSrcB points to the second input vector
<> 140:97feb9bacc10 6966 * @param[out] *pDst points to the output vector
<> 140:97feb9bacc10 6967 * @param[in] numSamples number of complex samples in each vector
<> 140:97feb9bacc10 6968 * @return none.
<> 140:97feb9bacc10 6969 */
<> 140:97feb9bacc10 6970
<> 140:97feb9bacc10 6971 void arm_cmplx_mult_cmplx_f32(
<> 140:97feb9bacc10 6972 float32_t * pSrcA,
<> 140:97feb9bacc10 6973 float32_t * pSrcB,
<> 140:97feb9bacc10 6974 float32_t * pDst,
<> 140:97feb9bacc10 6975 uint32_t numSamples);
<> 140:97feb9bacc10 6976
<> 140:97feb9bacc10 6977 /**
<> 140:97feb9bacc10 6978 * @brief Converts the elements of the floating-point vector to Q31 vector.
<> 140:97feb9bacc10 6979 * @param[in] *pSrc points to the floating-point input vector
<> 140:97feb9bacc10 6980 * @param[out] *pDst points to the Q31 output vector
<> 140:97feb9bacc10 6981 * @param[in] blockSize length of the input vector
<> 140:97feb9bacc10 6982 * @return none.
<> 140:97feb9bacc10 6983 */
<> 140:97feb9bacc10 6984 void arm_float_to_q31(
<> 140:97feb9bacc10 6985 float32_t * pSrc,
<> 140:97feb9bacc10 6986 q31_t * pDst,
<> 140:97feb9bacc10 6987 uint32_t blockSize);
<> 140:97feb9bacc10 6988
<> 140:97feb9bacc10 6989 /**
<> 140:97feb9bacc10 6990 * @brief Converts the elements of the floating-point vector to Q15 vector.
<> 140:97feb9bacc10 6991 * @param[in] *pSrc points to the floating-point input vector
<> 140:97feb9bacc10 6992 * @param[out] *pDst points to the Q15 output vector
<> 140:97feb9bacc10 6993 * @param[in] blockSize length of the input vector
<> 140:97feb9bacc10 6994 * @return none
<> 140:97feb9bacc10 6995 */
<> 140:97feb9bacc10 6996 void arm_float_to_q15(
<> 140:97feb9bacc10 6997 float32_t * pSrc,
<> 140:97feb9bacc10 6998 q15_t * pDst,
<> 140:97feb9bacc10 6999 uint32_t blockSize);
<> 140:97feb9bacc10 7000
<> 140:97feb9bacc10 7001 /**
<> 140:97feb9bacc10 7002 * @brief Converts the elements of the floating-point vector to Q7 vector.
<> 140:97feb9bacc10 7003 * @param[in] *pSrc points to the floating-point input vector
<> 140:97feb9bacc10 7004 * @param[out] *pDst points to the Q7 output vector
<> 140:97feb9bacc10 7005 * @param[in] blockSize length of the input vector
<> 140:97feb9bacc10 7006 * @return none
<> 140:97feb9bacc10 7007 */
<> 140:97feb9bacc10 7008 void arm_float_to_q7(
<> 140:97feb9bacc10 7009 float32_t * pSrc,
<> 140:97feb9bacc10 7010 q7_t * pDst,
<> 140:97feb9bacc10 7011 uint32_t blockSize);
<> 140:97feb9bacc10 7012
<> 140:97feb9bacc10 7013
<> 140:97feb9bacc10 7014 /**
<> 140:97feb9bacc10 7015 * @brief Converts the elements of the Q31 vector to Q15 vector.
<> 140:97feb9bacc10 7016 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 7017 * @param[out] *pDst is output pointer
<> 140:97feb9bacc10 7018 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 7019 * @return none.
<> 140:97feb9bacc10 7020 */
<> 140:97feb9bacc10 7021 void arm_q31_to_q15(
<> 140:97feb9bacc10 7022 q31_t * pSrc,
<> 140:97feb9bacc10 7023 q15_t * pDst,
<> 140:97feb9bacc10 7024 uint32_t blockSize);
<> 140:97feb9bacc10 7025
<> 140:97feb9bacc10 7026 /**
<> 140:97feb9bacc10 7027 * @brief Converts the elements of the Q31 vector to Q7 vector.
<> 140:97feb9bacc10 7028 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 7029 * @param[out] *pDst is output pointer
<> 140:97feb9bacc10 7030 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 7031 * @return none.
<> 140:97feb9bacc10 7032 */
<> 140:97feb9bacc10 7033 void arm_q31_to_q7(
<> 140:97feb9bacc10 7034 q31_t * pSrc,
<> 140:97feb9bacc10 7035 q7_t * pDst,
<> 140:97feb9bacc10 7036 uint32_t blockSize);
<> 140:97feb9bacc10 7037
<> 140:97feb9bacc10 7038 /**
<> 140:97feb9bacc10 7039 * @brief Converts the elements of the Q15 vector to floating-point vector.
<> 140:97feb9bacc10 7040 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 7041 * @param[out] *pDst is output pointer
<> 140:97feb9bacc10 7042 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 7043 * @return none.
<> 140:97feb9bacc10 7044 */
<> 140:97feb9bacc10 7045 void arm_q15_to_float(
<> 140:97feb9bacc10 7046 q15_t * pSrc,
<> 140:97feb9bacc10 7047 float32_t * pDst,
<> 140:97feb9bacc10 7048 uint32_t blockSize);
<> 140:97feb9bacc10 7049
<> 140:97feb9bacc10 7050
<> 140:97feb9bacc10 7051 /**
<> 140:97feb9bacc10 7052 * @brief Converts the elements of the Q15 vector to Q31 vector.
<> 140:97feb9bacc10 7053 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 7054 * @param[out] *pDst is output pointer
<> 140:97feb9bacc10 7055 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 7056 * @return none.
<> 140:97feb9bacc10 7057 */
<> 140:97feb9bacc10 7058 void arm_q15_to_q31(
<> 140:97feb9bacc10 7059 q15_t * pSrc,
<> 140:97feb9bacc10 7060 q31_t * pDst,
<> 140:97feb9bacc10 7061 uint32_t blockSize);
<> 140:97feb9bacc10 7062
<> 140:97feb9bacc10 7063
<> 140:97feb9bacc10 7064 /**
<> 140:97feb9bacc10 7065 * @brief Converts the elements of the Q15 vector to Q7 vector.
<> 140:97feb9bacc10 7066 * @param[in] *pSrc is input pointer
<> 140:97feb9bacc10 7067 * @param[out] *pDst is output pointer
<> 140:97feb9bacc10 7068 * @param[in] blockSize is the number of samples to process
<> 140:97feb9bacc10 7069 * @return none.
<> 140:97feb9bacc10 7070 */
<> 140:97feb9bacc10 7071 void arm_q15_to_q7(
<> 140:97feb9bacc10 7072 q15_t * pSrc,
<> 140:97feb9bacc10 7073 q7_t * pDst,
<> 140:97feb9bacc10 7074 uint32_t blockSize);
<> 140:97feb9bacc10 7075
<> 140:97feb9bacc10 7076
<> 140:97feb9bacc10 7077 /**
<> 140:97feb9bacc10 7078 * @ingroup groupInterpolation
<> 140:97feb9bacc10 7079 */
<> 140:97feb9bacc10 7080
<> 140:97feb9bacc10 7081 /**
<> 140:97feb9bacc10 7082 * @defgroup BilinearInterpolate Bilinear Interpolation
<> 140:97feb9bacc10 7083 *
<> 140:97feb9bacc10 7084 * Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid.
<> 140:97feb9bacc10 7085 * The underlying function <code>f(x, y)</code> is sampled on a regular grid and the interpolation process
<> 140:97feb9bacc10 7086 * determines values between the grid points.
<> 140:97feb9bacc10 7087 * Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension.
<> 140:97feb9bacc10 7088 * Bilinear interpolation is often used in image processing to rescale images.
<> 140:97feb9bacc10 7089 * The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types.
<> 140:97feb9bacc10 7090 *
<> 140:97feb9bacc10 7091 * <b>Algorithm</b>
<> 140:97feb9bacc10 7092 * \par
<> 140:97feb9bacc10 7093 * The instance structure used by the bilinear interpolation functions describes a two dimensional data table.
<> 140:97feb9bacc10 7094 * For floating-point, the instance structure is defined as:
<> 140:97feb9bacc10 7095 * <pre>
<> 140:97feb9bacc10 7096 * typedef struct
<> 140:97feb9bacc10 7097 * {
<> 140:97feb9bacc10 7098 * uint16_t numRows;
<> 140:97feb9bacc10 7099 * uint16_t numCols;
<> 140:97feb9bacc10 7100 * float32_t *pData;
<> 140:97feb9bacc10 7101 * } arm_bilinear_interp_instance_f32;
<> 140:97feb9bacc10 7102 * </pre>
<> 140:97feb9bacc10 7103 *
<> 140:97feb9bacc10 7104 * \par
<> 140:97feb9bacc10 7105 * where <code>numRows</code> specifies the number of rows in the table;
<> 140:97feb9bacc10 7106 * <code>numCols</code> specifies the number of columns in the table;
<> 140:97feb9bacc10 7107 * and <code>pData</code> points to an array of size <code>numRows*numCols</code> values.
<> 140:97feb9bacc10 7108 * The data table <code>pTable</code> is organized in row order and the supplied data values fall on integer indexes.
<> 140:97feb9bacc10 7109 * That is, table element (x,y) is located at <code>pTable[x + y*numCols]</code> where x and y are integers.
<> 140:97feb9bacc10 7110 *
<> 140:97feb9bacc10 7111 * \par
<> 140:97feb9bacc10 7112 * Let <code>(x, y)</code> specify the desired interpolation point. Then define:
<> 140:97feb9bacc10 7113 * <pre>
<> 140:97feb9bacc10 7114 * XF = floor(x)
<> 140:97feb9bacc10 7115 * YF = floor(y)
<> 140:97feb9bacc10 7116 * </pre>
<> 140:97feb9bacc10 7117 * \par
<> 140:97feb9bacc10 7118 * The interpolated output point is computed as:
<> 140:97feb9bacc10 7119 * <pre>
<> 140:97feb9bacc10 7120 * f(x, y) = f(XF, YF) * (1-(x-XF)) * (1-(y-YF))
<> 140:97feb9bacc10 7121 * + f(XF+1, YF) * (x-XF)*(1-(y-YF))
<> 140:97feb9bacc10 7122 * + f(XF, YF+1) * (1-(x-XF))*(y-YF)
<> 140:97feb9bacc10 7123 * + f(XF+1, YF+1) * (x-XF)*(y-YF)
<> 140:97feb9bacc10 7124 * </pre>
<> 140:97feb9bacc10 7125 * Note that the coordinates (x, y) contain integer and fractional components.
<> 140:97feb9bacc10 7126 * The integer components specify which portion of the table to use while the
<> 140:97feb9bacc10 7127 * fractional components control the interpolation processor.
<> 140:97feb9bacc10 7128 *
<> 140:97feb9bacc10 7129 * \par
<> 140:97feb9bacc10 7130 * if (x,y) are outside of the table boundary, Bilinear interpolation returns zero output.
<> 140:97feb9bacc10 7131 */
<> 140:97feb9bacc10 7132
<> 140:97feb9bacc10 7133 /**
<> 140:97feb9bacc10 7134 * @addtogroup BilinearInterpolate
<> 140:97feb9bacc10 7135 * @{
<> 140:97feb9bacc10 7136 */
<> 140:97feb9bacc10 7137
<> 140:97feb9bacc10 7138 /**
<> 140:97feb9bacc10 7139 *
<> 140:97feb9bacc10 7140 * @brief Floating-point bilinear interpolation.
<> 140:97feb9bacc10 7141 * @param[in,out] *S points to an instance of the interpolation structure.
<> 140:97feb9bacc10 7142 * @param[in] X interpolation coordinate.
<> 140:97feb9bacc10 7143 * @param[in] Y interpolation coordinate.
<> 140:97feb9bacc10 7144 * @return out interpolated value.
<> 140:97feb9bacc10 7145 */
<> 140:97feb9bacc10 7146
<> 140:97feb9bacc10 7147
<> 140:97feb9bacc10 7148 static __INLINE float32_t arm_bilinear_interp_f32(
<> 140:97feb9bacc10 7149 const arm_bilinear_interp_instance_f32 * S,
<> 140:97feb9bacc10 7150 float32_t X,
<> 140:97feb9bacc10 7151 float32_t Y)
<> 140:97feb9bacc10 7152 {
<> 140:97feb9bacc10 7153 float32_t out;
<> 140:97feb9bacc10 7154 float32_t f00, f01, f10, f11;
<> 140:97feb9bacc10 7155 float32_t *pData = S->pData;
<> 140:97feb9bacc10 7156 int32_t xIndex, yIndex, index;
<> 140:97feb9bacc10 7157 float32_t xdiff, ydiff;
<> 140:97feb9bacc10 7158 float32_t b1, b2, b3, b4;
<> 140:97feb9bacc10 7159
<> 140:97feb9bacc10 7160 xIndex = (int32_t) X;
<> 140:97feb9bacc10 7161 yIndex = (int32_t) Y;
<> 140:97feb9bacc10 7162
<> 140:97feb9bacc10 7163 /* Care taken for table outside boundary */
<> 140:97feb9bacc10 7164 /* Returns zero output when values are outside table boundary */
<> 140:97feb9bacc10 7165 if(xIndex < 0 || xIndex > (S->numRows - 1) || yIndex < 0
<> 140:97feb9bacc10 7166 || yIndex > (S->numCols - 1))
<> 140:97feb9bacc10 7167 {
<> 140:97feb9bacc10 7168 return (0);
<> 140:97feb9bacc10 7169 }
<> 140:97feb9bacc10 7170
<> 140:97feb9bacc10 7171 /* Calculation of index for two nearest points in X-direction */
<> 140:97feb9bacc10 7172 index = (xIndex - 1) + (yIndex - 1) * S->numCols;
<> 140:97feb9bacc10 7173
<> 140:97feb9bacc10 7174
<> 140:97feb9bacc10 7175 /* Read two nearest points in X-direction */
<> 140:97feb9bacc10 7176 f00 = pData[index];
<> 140:97feb9bacc10 7177 f01 = pData[index + 1];
<> 140:97feb9bacc10 7178
<> 140:97feb9bacc10 7179 /* Calculation of index for two nearest points in Y-direction */
<> 140:97feb9bacc10 7180 index = (xIndex - 1) + (yIndex) * S->numCols;
<> 140:97feb9bacc10 7181
<> 140:97feb9bacc10 7182
<> 140:97feb9bacc10 7183 /* Read two nearest points in Y-direction */
<> 140:97feb9bacc10 7184 f10 = pData[index];
<> 140:97feb9bacc10 7185 f11 = pData[index + 1];
<> 140:97feb9bacc10 7186
<> 140:97feb9bacc10 7187 /* Calculation of intermediate values */
<> 140:97feb9bacc10 7188 b1 = f00;
<> 140:97feb9bacc10 7189 b2 = f01 - f00;
<> 140:97feb9bacc10 7190 b3 = f10 - f00;
<> 140:97feb9bacc10 7191 b4 = f00 - f01 - f10 + f11;
<> 140:97feb9bacc10 7192
<> 140:97feb9bacc10 7193 /* Calculation of fractional part in X */
<> 140:97feb9bacc10 7194 xdiff = X - xIndex;
<> 140:97feb9bacc10 7195
<> 140:97feb9bacc10 7196 /* Calculation of fractional part in Y */
<> 140:97feb9bacc10 7197 ydiff = Y - yIndex;
<> 140:97feb9bacc10 7198
<> 140:97feb9bacc10 7199 /* Calculation of bi-linear interpolated output */
<> 140:97feb9bacc10 7200 out = b1 + b2 * xdiff + b3 * ydiff + b4 * xdiff * ydiff;
<> 140:97feb9bacc10 7201
<> 140:97feb9bacc10 7202 /* return to application */
<> 140:97feb9bacc10 7203 return (out);
<> 140:97feb9bacc10 7204
<> 140:97feb9bacc10 7205 }
<> 140:97feb9bacc10 7206
<> 140:97feb9bacc10 7207 /**
<> 140:97feb9bacc10 7208 *
<> 140:97feb9bacc10 7209 * @brief Q31 bilinear interpolation.
<> 140:97feb9bacc10 7210 * @param[in,out] *S points to an instance of the interpolation structure.
<> 140:97feb9bacc10 7211 * @param[in] X interpolation coordinate in 12.20 format.
<> 140:97feb9bacc10 7212 * @param[in] Y interpolation coordinate in 12.20 format.
<> 140:97feb9bacc10 7213 * @return out interpolated value.
<> 140:97feb9bacc10 7214 */
<> 140:97feb9bacc10 7215
<> 140:97feb9bacc10 7216 static __INLINE q31_t arm_bilinear_interp_q31(
<> 140:97feb9bacc10 7217 arm_bilinear_interp_instance_q31 * S,
<> 140:97feb9bacc10 7218 q31_t X,
<> 140:97feb9bacc10 7219 q31_t Y)
<> 140:97feb9bacc10 7220 {
<> 140:97feb9bacc10 7221 q31_t out; /* Temporary output */
<> 140:97feb9bacc10 7222 q31_t acc = 0; /* output */
<> 140:97feb9bacc10 7223 q31_t xfract, yfract; /* X, Y fractional parts */
<> 140:97feb9bacc10 7224 q31_t x1, x2, y1, y2; /* Nearest output values */
<> 140:97feb9bacc10 7225 int32_t rI, cI; /* Row and column indices */
<> 140:97feb9bacc10 7226 q31_t *pYData = S->pData; /* pointer to output table values */
<> 140:97feb9bacc10 7227 uint32_t nCols = S->numCols; /* num of rows */
<> 140:97feb9bacc10 7228
<> 140:97feb9bacc10 7229
<> 140:97feb9bacc10 7230 /* Input is in 12.20 format */
<> 140:97feb9bacc10 7231 /* 12 bits for the table index */
<> 140:97feb9bacc10 7232 /* Index value calculation */
<> 140:97feb9bacc10 7233 rI = ((X & 0xFFF00000) >> 20u);
<> 140:97feb9bacc10 7234
<> 140:97feb9bacc10 7235 /* Input is in 12.20 format */
<> 140:97feb9bacc10 7236 /* 12 bits for the table index */
<> 140:97feb9bacc10 7237 /* Index value calculation */
<> 140:97feb9bacc10 7238 cI = ((Y & 0xFFF00000) >> 20u);
<> 140:97feb9bacc10 7239
<> 140:97feb9bacc10 7240 /* Care taken for table outside boundary */
<> 140:97feb9bacc10 7241 /* Returns zero output when values are outside table boundary */
<> 140:97feb9bacc10 7242 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 140:97feb9bacc10 7243 {
<> 140:97feb9bacc10 7244 return (0);
<> 140:97feb9bacc10 7245 }
<> 140:97feb9bacc10 7246
<> 140:97feb9bacc10 7247 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 7248 /* shift left xfract by 11 to keep 1.31 format */
<> 140:97feb9bacc10 7249 xfract = (X & 0x000FFFFF) << 11u;
<> 140:97feb9bacc10 7250
<> 140:97feb9bacc10 7251 /* Read two nearest output values from the index */
<> 140:97feb9bacc10 7252 x1 = pYData[(rI) + nCols * (cI)];
<> 140:97feb9bacc10 7253 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 140:97feb9bacc10 7254
<> 140:97feb9bacc10 7255 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 7256 /* shift left yfract by 11 to keep 1.31 format */
<> 140:97feb9bacc10 7257 yfract = (Y & 0x000FFFFF) << 11u;
<> 140:97feb9bacc10 7258
<> 140:97feb9bacc10 7259 /* Read two nearest output values from the index */
<> 140:97feb9bacc10 7260 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 140:97feb9bacc10 7261 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 140:97feb9bacc10 7262
<> 140:97feb9bacc10 7263 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 3.29(q29) format */
<> 140:97feb9bacc10 7264 out = ((q31_t) (((q63_t) x1 * (0x7FFFFFFF - xfract)) >> 32));
<> 140:97feb9bacc10 7265 acc = ((q31_t) (((q63_t) out * (0x7FFFFFFF - yfract)) >> 32));
<> 140:97feb9bacc10 7266
<> 140:97feb9bacc10 7267 /* x2 * (xfract) * (1-yfract) in 3.29(q29) and adding to acc */
<> 140:97feb9bacc10 7268 out = ((q31_t) ((q63_t) x2 * (0x7FFFFFFF - yfract) >> 32));
<> 140:97feb9bacc10 7269 acc += ((q31_t) ((q63_t) out * (xfract) >> 32));
<> 140:97feb9bacc10 7270
<> 140:97feb9bacc10 7271 /* y1 * (1 - xfract) * (yfract) in 3.29(q29) and adding to acc */
<> 140:97feb9bacc10 7272 out = ((q31_t) ((q63_t) y1 * (0x7FFFFFFF - xfract) >> 32));
<> 140:97feb9bacc10 7273 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
<> 140:97feb9bacc10 7274
<> 140:97feb9bacc10 7275 /* y2 * (xfract) * (yfract) in 3.29(q29) and adding to acc */
<> 140:97feb9bacc10 7276 out = ((q31_t) ((q63_t) y2 * (xfract) >> 32));
<> 140:97feb9bacc10 7277 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
<> 140:97feb9bacc10 7278
<> 140:97feb9bacc10 7279 /* Convert acc to 1.31(q31) format */
<> 140:97feb9bacc10 7280 return (acc << 2u);
<> 140:97feb9bacc10 7281
<> 140:97feb9bacc10 7282 }
<> 140:97feb9bacc10 7283
<> 140:97feb9bacc10 7284 /**
<> 140:97feb9bacc10 7285 * @brief Q15 bilinear interpolation.
<> 140:97feb9bacc10 7286 * @param[in,out] *S points to an instance of the interpolation structure.
<> 140:97feb9bacc10 7287 * @param[in] X interpolation coordinate in 12.20 format.
<> 140:97feb9bacc10 7288 * @param[in] Y interpolation coordinate in 12.20 format.
<> 140:97feb9bacc10 7289 * @return out interpolated value.
<> 140:97feb9bacc10 7290 */
<> 140:97feb9bacc10 7291
<> 140:97feb9bacc10 7292 static __INLINE q15_t arm_bilinear_interp_q15(
<> 140:97feb9bacc10 7293 arm_bilinear_interp_instance_q15 * S,
<> 140:97feb9bacc10 7294 q31_t X,
<> 140:97feb9bacc10 7295 q31_t Y)
<> 140:97feb9bacc10 7296 {
<> 140:97feb9bacc10 7297 q63_t acc = 0; /* output */
<> 140:97feb9bacc10 7298 q31_t out; /* Temporary output */
<> 140:97feb9bacc10 7299 q15_t x1, x2, y1, y2; /* Nearest output values */
<> 140:97feb9bacc10 7300 q31_t xfract, yfract; /* X, Y fractional parts */
<> 140:97feb9bacc10 7301 int32_t rI, cI; /* Row and column indices */
<> 140:97feb9bacc10 7302 q15_t *pYData = S->pData; /* pointer to output table values */
<> 140:97feb9bacc10 7303 uint32_t nCols = S->numCols; /* num of rows */
<> 140:97feb9bacc10 7304
<> 140:97feb9bacc10 7305 /* Input is in 12.20 format */
<> 140:97feb9bacc10 7306 /* 12 bits for the table index */
<> 140:97feb9bacc10 7307 /* Index value calculation */
<> 140:97feb9bacc10 7308 rI = ((X & 0xFFF00000) >> 20);
<> 140:97feb9bacc10 7309
<> 140:97feb9bacc10 7310 /* Input is in 12.20 format */
<> 140:97feb9bacc10 7311 /* 12 bits for the table index */
<> 140:97feb9bacc10 7312 /* Index value calculation */
<> 140:97feb9bacc10 7313 cI = ((Y & 0xFFF00000) >> 20);
<> 140:97feb9bacc10 7314
<> 140:97feb9bacc10 7315 /* Care taken for table outside boundary */
<> 140:97feb9bacc10 7316 /* Returns zero output when values are outside table boundary */
<> 140:97feb9bacc10 7317 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 140:97feb9bacc10 7318 {
<> 140:97feb9bacc10 7319 return (0);
<> 140:97feb9bacc10 7320 }
<> 140:97feb9bacc10 7321
<> 140:97feb9bacc10 7322 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 7323 /* xfract should be in 12.20 format */
<> 140:97feb9bacc10 7324 xfract = (X & 0x000FFFFF);
<> 140:97feb9bacc10 7325
<> 140:97feb9bacc10 7326 /* Read two nearest output values from the index */
<> 140:97feb9bacc10 7327 x1 = pYData[(rI) + nCols * (cI)];
<> 140:97feb9bacc10 7328 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 140:97feb9bacc10 7329
<> 140:97feb9bacc10 7330
<> 140:97feb9bacc10 7331 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 7332 /* yfract should be in 12.20 format */
<> 140:97feb9bacc10 7333 yfract = (Y & 0x000FFFFF);
<> 140:97feb9bacc10 7334
<> 140:97feb9bacc10 7335 /* Read two nearest output values from the index */
<> 140:97feb9bacc10 7336 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 140:97feb9bacc10 7337 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 140:97feb9bacc10 7338
<> 140:97feb9bacc10 7339 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 13.51 format */
<> 140:97feb9bacc10 7340
<> 140:97feb9bacc10 7341 /* x1 is in 1.15(q15), xfract in 12.20 format and out is in 13.35 format */
<> 140:97feb9bacc10 7342 /* convert 13.35 to 13.31 by right shifting and out is in 1.31 */
<> 140:97feb9bacc10 7343 out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4u);
<> 140:97feb9bacc10 7344 acc = ((q63_t) out * (0xFFFFF - yfract));
<> 140:97feb9bacc10 7345
<> 140:97feb9bacc10 7346 /* x2 * (xfract) * (1-yfract) in 1.51 and adding to acc */
<> 140:97feb9bacc10 7347 out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4u);
<> 140:97feb9bacc10 7348 acc += ((q63_t) out * (xfract));
<> 140:97feb9bacc10 7349
<> 140:97feb9bacc10 7350 /* y1 * (1 - xfract) * (yfract) in 1.51 and adding to acc */
<> 140:97feb9bacc10 7351 out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4u);
<> 140:97feb9bacc10 7352 acc += ((q63_t) out * (yfract));
<> 140:97feb9bacc10 7353
<> 140:97feb9bacc10 7354 /* y2 * (xfract) * (yfract) in 1.51 and adding to acc */
<> 140:97feb9bacc10 7355 out = (q31_t) (((q63_t) y2 * (xfract)) >> 4u);
<> 140:97feb9bacc10 7356 acc += ((q63_t) out * (yfract));
<> 140:97feb9bacc10 7357
<> 140:97feb9bacc10 7358 /* acc is in 13.51 format and down shift acc by 36 times */
<> 140:97feb9bacc10 7359 /* Convert out to 1.15 format */
<> 140:97feb9bacc10 7360 return (acc >> 36);
<> 140:97feb9bacc10 7361
<> 140:97feb9bacc10 7362 }
<> 140:97feb9bacc10 7363
<> 140:97feb9bacc10 7364 /**
<> 140:97feb9bacc10 7365 * @brief Q7 bilinear interpolation.
<> 140:97feb9bacc10 7366 * @param[in,out] *S points to an instance of the interpolation structure.
<> 140:97feb9bacc10 7367 * @param[in] X interpolation coordinate in 12.20 format.
<> 140:97feb9bacc10 7368 * @param[in] Y interpolation coordinate in 12.20 format.
<> 140:97feb9bacc10 7369 * @return out interpolated value.
<> 140:97feb9bacc10 7370 */
<> 140:97feb9bacc10 7371
<> 140:97feb9bacc10 7372 static __INLINE q7_t arm_bilinear_interp_q7(
<> 140:97feb9bacc10 7373 arm_bilinear_interp_instance_q7 * S,
<> 140:97feb9bacc10 7374 q31_t X,
<> 140:97feb9bacc10 7375 q31_t Y)
<> 140:97feb9bacc10 7376 {
<> 140:97feb9bacc10 7377 q63_t acc = 0; /* output */
<> 140:97feb9bacc10 7378 q31_t out; /* Temporary output */
<> 140:97feb9bacc10 7379 q31_t xfract, yfract; /* X, Y fractional parts */
<> 140:97feb9bacc10 7380 q7_t x1, x2, y1, y2; /* Nearest output values */
<> 140:97feb9bacc10 7381 int32_t rI, cI; /* Row and column indices */
<> 140:97feb9bacc10 7382 q7_t *pYData = S->pData; /* pointer to output table values */
<> 140:97feb9bacc10 7383 uint32_t nCols = S->numCols; /* num of rows */
<> 140:97feb9bacc10 7384
<> 140:97feb9bacc10 7385 /* Input is in 12.20 format */
<> 140:97feb9bacc10 7386 /* 12 bits for the table index */
<> 140:97feb9bacc10 7387 /* Index value calculation */
<> 140:97feb9bacc10 7388 rI = ((X & 0xFFF00000) >> 20);
<> 140:97feb9bacc10 7389
<> 140:97feb9bacc10 7390 /* Input is in 12.20 format */
<> 140:97feb9bacc10 7391 /* 12 bits for the table index */
<> 140:97feb9bacc10 7392 /* Index value calculation */
<> 140:97feb9bacc10 7393 cI = ((Y & 0xFFF00000) >> 20);
<> 140:97feb9bacc10 7394
<> 140:97feb9bacc10 7395 /* Care taken for table outside boundary */
<> 140:97feb9bacc10 7396 /* Returns zero output when values are outside table boundary */
<> 140:97feb9bacc10 7397 if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
<> 140:97feb9bacc10 7398 {
<> 140:97feb9bacc10 7399 return (0);
<> 140:97feb9bacc10 7400 }
<> 140:97feb9bacc10 7401
<> 140:97feb9bacc10 7402 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 7403 /* xfract should be in 12.20 format */
<> 140:97feb9bacc10 7404 xfract = (X & 0x000FFFFF);
<> 140:97feb9bacc10 7405
<> 140:97feb9bacc10 7406 /* Read two nearest output values from the index */
<> 140:97feb9bacc10 7407 x1 = pYData[(rI) + nCols * (cI)];
<> 140:97feb9bacc10 7408 x2 = pYData[(rI) + nCols * (cI) + 1u];
<> 140:97feb9bacc10 7409
<> 140:97feb9bacc10 7410
<> 140:97feb9bacc10 7411 /* 20 bits for the fractional part */
<> 140:97feb9bacc10 7412 /* yfract should be in 12.20 format */
<> 140:97feb9bacc10 7413 yfract = (Y & 0x000FFFFF);
<> 140:97feb9bacc10 7414
<> 140:97feb9bacc10 7415 /* Read two nearest output values from the index */
<> 140:97feb9bacc10 7416 y1 = pYData[(rI) + nCols * (cI + 1)];
<> 140:97feb9bacc10 7417 y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
<> 140:97feb9bacc10 7418
<> 140:97feb9bacc10 7419 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 16.47 format */
<> 140:97feb9bacc10 7420 out = ((x1 * (0xFFFFF - xfract)));
<> 140:97feb9bacc10 7421 acc = (((q63_t) out * (0xFFFFF - yfract)));
<> 140:97feb9bacc10 7422
<> 140:97feb9bacc10 7423 /* x2 * (xfract) * (1-yfract) in 2.22 and adding to acc */
<> 140:97feb9bacc10 7424 out = ((x2 * (0xFFFFF - yfract)));
<> 140:97feb9bacc10 7425 acc += (((q63_t) out * (xfract)));
<> 140:97feb9bacc10 7426
<> 140:97feb9bacc10 7427 /* y1 * (1 - xfract) * (yfract) in 2.22 and adding to acc */
<> 140:97feb9bacc10 7428 out = ((y1 * (0xFFFFF - xfract)));
<> 140:97feb9bacc10 7429 acc += (((q63_t) out * (yfract)));
<> 140:97feb9bacc10 7430
<> 140:97feb9bacc10 7431 /* y2 * (xfract) * (yfract) in 2.22 and adding to acc */
<> 140:97feb9bacc10 7432 out = ((y2 * (yfract)));
<> 140:97feb9bacc10 7433 acc += (((q63_t) out * (xfract)));
<> 140:97feb9bacc10 7434
<> 140:97feb9bacc10 7435 /* acc in 16.47 format and down shift by 40 to convert to 1.7 format */
<> 140:97feb9bacc10 7436 return (acc >> 40);
<> 140:97feb9bacc10 7437
<> 140:97feb9bacc10 7438 }
<> 140:97feb9bacc10 7439
<> 140:97feb9bacc10 7440 /**
<> 140:97feb9bacc10 7441 * @} end of BilinearInterpolate group
<> 140:97feb9bacc10 7442 */
<> 140:97feb9bacc10 7443
<> 140:97feb9bacc10 7444
<> 140:97feb9bacc10 7445 //SMMLAR
<> 140:97feb9bacc10 7446 #define multAcc_32x32_keep32_R(a, x, y) \
<> 140:97feb9bacc10 7447 a = (q31_t) (((((q63_t) a) << 32) + ((q63_t) x * y) + 0x80000000LL ) >> 32)
<> 140:97feb9bacc10 7448
<> 140:97feb9bacc10 7449 //SMMLSR
<> 140:97feb9bacc10 7450 #define multSub_32x32_keep32_R(a, x, y) \
<> 140:97feb9bacc10 7451 a = (q31_t) (((((q63_t) a) << 32) - ((q63_t) x * y) + 0x80000000LL ) >> 32)
<> 140:97feb9bacc10 7452
<> 140:97feb9bacc10 7453 //SMMULR
<> 140:97feb9bacc10 7454 #define mult_32x32_keep32_R(a, x, y) \
<> 140:97feb9bacc10 7455 a = (q31_t) (((q63_t) x * y + 0x80000000LL ) >> 32)
<> 140:97feb9bacc10 7456
<> 140:97feb9bacc10 7457 //SMMLA
<> 140:97feb9bacc10 7458 #define multAcc_32x32_keep32(a, x, y) \
<> 140:97feb9bacc10 7459 a += (q31_t) (((q63_t) x * y) >> 32)
<> 140:97feb9bacc10 7460
<> 140:97feb9bacc10 7461 //SMMLS
<> 140:97feb9bacc10 7462 #define multSub_32x32_keep32(a, x, y) \
<> 140:97feb9bacc10 7463 a -= (q31_t) (((q63_t) x * y) >> 32)
<> 140:97feb9bacc10 7464
<> 140:97feb9bacc10 7465 //SMMUL
<> 140:97feb9bacc10 7466 #define mult_32x32_keep32(a, x, y) \
<> 140:97feb9bacc10 7467 a = (q31_t) (((q63_t) x * y ) >> 32)
<> 140:97feb9bacc10 7468
<> 140:97feb9bacc10 7469
<> 140:97feb9bacc10 7470 #if defined ( __CC_ARM ) //Keil
<> 140:97feb9bacc10 7471
<> 140:97feb9bacc10 7472 //Enter low optimization region - place directly above function definition
<> 140:97feb9bacc10 7473 #ifdef ARM_MATH_CM4
<> 140:97feb9bacc10 7474 #define LOW_OPTIMIZATION_ENTER \
<> 140:97feb9bacc10 7475 _Pragma ("push") \
<> 140:97feb9bacc10 7476 _Pragma ("O1")
<> 140:97feb9bacc10 7477 #else
<> 140:97feb9bacc10 7478 #define LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7479 #endif
<> 140:97feb9bacc10 7480
<> 140:97feb9bacc10 7481 //Exit low optimization region - place directly after end of function definition
<> 140:97feb9bacc10 7482 #ifdef ARM_MATH_CM4
<> 140:97feb9bacc10 7483 #define LOW_OPTIMIZATION_EXIT \
<> 140:97feb9bacc10 7484 _Pragma ("pop")
<> 140:97feb9bacc10 7485 #else
<> 140:97feb9bacc10 7486 #define LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7487 #endif
<> 140:97feb9bacc10 7488
<> 140:97feb9bacc10 7489 //Enter low optimization region - place directly above function definition
<> 140:97feb9bacc10 7490 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7491
<> 140:97feb9bacc10 7492 //Exit low optimization region - place directly after end of function definition
<> 140:97feb9bacc10 7493 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7494
<> 140:97feb9bacc10 7495 #elif defined(__ICCARM__) //IAR
<> 140:97feb9bacc10 7496
<> 140:97feb9bacc10 7497 //Enter low optimization region - place directly above function definition
<> 140:97feb9bacc10 7498 #ifdef ARM_MATH_CM4
<> 140:97feb9bacc10 7499 #define LOW_OPTIMIZATION_ENTER \
<> 140:97feb9bacc10 7500 _Pragma ("optimize=low")
<> 140:97feb9bacc10 7501 #else
<> 140:97feb9bacc10 7502 #define LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7503 #endif
<> 140:97feb9bacc10 7504
<> 140:97feb9bacc10 7505 //Exit low optimization region - place directly after end of function definition
<> 140:97feb9bacc10 7506 #define LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7507
<> 140:97feb9bacc10 7508 //Enter low optimization region - place directly above function definition
<> 140:97feb9bacc10 7509 #ifdef ARM_MATH_CM4
<> 140:97feb9bacc10 7510 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER \
<> 140:97feb9bacc10 7511 _Pragma ("optimize=low")
<> 140:97feb9bacc10 7512 #else
<> 140:97feb9bacc10 7513 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7514 #endif
<> 140:97feb9bacc10 7515
<> 140:97feb9bacc10 7516 //Exit low optimization region - place directly after end of function definition
<> 140:97feb9bacc10 7517 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7518
<> 140:97feb9bacc10 7519 #elif defined(__GNUC__)
<> 140:97feb9bacc10 7520
<> 140:97feb9bacc10 7521 #define LOW_OPTIMIZATION_ENTER __attribute__(( optimize("-O1") ))
<> 140:97feb9bacc10 7522
<> 140:97feb9bacc10 7523 #define LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7524
<> 140:97feb9bacc10 7525 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7526
<> 140:97feb9bacc10 7527 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7528
<> 140:97feb9bacc10 7529 #elif defined(__CSMC__) // Cosmic
<> 140:97feb9bacc10 7530
<> 140:97feb9bacc10 7531 #define LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7532 #define LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7533 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7534 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7535
<> 140:97feb9bacc10 7536 #elif defined(__TASKING__) // TASKING
<> 140:97feb9bacc10 7537
<> 140:97feb9bacc10 7538 #define LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7539 #define LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7540 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
<> 140:97feb9bacc10 7541 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
<> 140:97feb9bacc10 7542
<> 140:97feb9bacc10 7543 #endif
<> 140:97feb9bacc10 7544
<> 140:97feb9bacc10 7545
<> 140:97feb9bacc10 7546 #ifdef __cplusplus
<> 140:97feb9bacc10 7547 }
<> 140:97feb9bacc10 7548 #endif
<> 140:97feb9bacc10 7549
<> 140:97feb9bacc10 7550
<> 140:97feb9bacc10 7551 #endif /* _ARM_MATH_H */
<> 140:97feb9bacc10 7552
<> 140:97feb9bacc10 7553 /**
<> 140:97feb9bacc10 7554 *
<> 140:97feb9bacc10 7555 * End of file.
<> 140:97feb9bacc10 7556 */