From 5721f94b28da9f5b52c074d2c39b96a584fe8ab5 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Wed, 27 Jul 2022 14:09:42 +0200 Subject: [PATCH] Improved documentation Corrected issues #7 and #8 Removed duplicates Started using Mathjax --- Doxygen/templates/extra_stylesheet.css | 13 ++- Include/dsp/controller_functions.h | 62 +++++-------- Source/BasicMathFunctions/arm_abs_f16.c | 13 --- Source/BasicMathFunctions/arm_add_f16.c | 11 --- Source/BasicMathFunctions/arm_dot_prod_f16.c | 12 --- Source/BasicMathFunctions/arm_mult_f16.c | 11 --- Source/BasicMathFunctions/arm_negate_f16.c | 13 --- Source/BasicMathFunctions/arm_offset_f16.c | 14 --- Source/BasicMathFunctions/arm_scale_f16.c | 25 ----- Source/BasicMathFunctions/arm_sub_f16.c | 11 --- .../ComplexMathFunctions/arm_cmplx_conj_f16.c | 22 ----- .../arm_cmplx_dot_prod_f16.c | 26 ------ .../ComplexMathFunctions/arm_cmplx_mag_f16.c | 22 ----- .../ComplexMathFunctions/arm_cmplx_mag_f64.c | 22 ----- .../arm_cmplx_mag_squared_f16.c | 23 ----- .../arm_cmplx_mult_cmplx_f16.c | 20 ---- .../arm_cmplx_mult_real_f16.c | 22 ----- Source/FastMathFunctions/arm_divide_q31.c | 5 - Source/FastMathFunctions/arm_sqrt_q15.c | 3 +- Source/FastMathFunctions/arm_sqrt_q31.c | 3 +- Source/FastMathFunctions/arm_vexp_f16.c | 14 +++ Source/FastMathFunctions/arm_vexp_f32.c | 26 ++++++ Source/FastMathFunctions/arm_vexp_f64.c | 16 ++++ Source/FilteringFunctions/arm_conv_f32.c | 6 ++ .../FilteringFunctions/arm_conv_partial_f32.c | 6 ++ Source/FilteringFunctions/arm_correlate_f16.c | 46 +-------- Source/FilteringFunctions/arm_correlate_f32.c | 5 + .../arm_levinson_durbin_f16.c | 3 - .../arm_levinson_durbin_q31.c | 3 - .../arm_bilinear_interp_f16.c | 51 ---------- .../arm_linear_interp_f16.c | 31 ------- Source/MatrixFunctions/arm_mat_init_q31.c | 5 +- Source/MatrixFunctions/arm_mat_mult_f32.c | 22 ++++- Source/MatrixFunctions/arm_mat_mult_f64.c | 17 ---- Source/MatrixFunctions/arm_mat_sub_f64.c | 10 -- Source/MatrixFunctions/arm_mat_trans_f64.c | 7 -- Source/SVMFunctions/arm_svm_linear_init_f16.c | 9 -- .../arm_svm_polynomial_init_f16.c | 5 - Source/SVMFunctions/arm_svm_rbf_init_f16.c | 5 - .../SVMFunctions/arm_svm_sigmoid_init_f16.c | 5 - Source/StatisticsFunctions/arm_rms_f16.c | 11 --- Source/TransformFunctions/arm_rfft_fast_f16.c | 93 ------------------- Source/TransformFunctions/arm_rfft_fast_f32.c | 2 + Source/TransformFunctions/arm_rfft_q15.c | 32 ++++++- Source/TransformFunctions/arm_rfft_q31.c | 32 ++++++- 45 files changed, 194 insertions(+), 621 deletions(-) diff --git a/Doxygen/templates/extra_stylesheet.css b/Doxygen/templates/extra_stylesheet.css index 52d31239..e60ad6eb 100644 --- a/Doxygen/templates/extra_stylesheet.css +++ b/Doxygen/templates/extra_stylesheet.css @@ -1022,7 +1022,6 @@ table.markdownTable { table.markdownTable td, table.markdownTable th { border: 1px solid var(--arm_light_gray); padding: 7px 10px 5px; - text-align:left; } table.markdownTable th { @@ -1048,6 +1047,18 @@ table.markdownTable th a:hover{ color: var(--arm_yellow); } +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + /* @end */ diff --git a/Include/dsp/controller_functions.h b/Include/dsp/controller_functions.h index cb1d26c4..667c40e6 100755 --- a/Include/dsp/controller_functions.h +++ b/Include/dsp/controller_functions.h @@ -104,10 +104,11 @@ extern "C" q31_t * pSinVal, q31_t * pCosVal); - /** - * @ingroup groupController - */ +/** + @ingroup groupController + */ + /** * @defgroup PID PID Motor Control * @@ -168,6 +169,7 @@ extern "C" /** + * @ingroup PID * @brief Instance structure for the Q15 PID Control. */ typedef struct @@ -186,6 +188,7 @@ extern "C" } arm_pid_instance_q15; /** + * @ingroup PID * @brief Instance structure for the Q31 PID Control. */ typedef struct @@ -200,6 +203,7 @@ extern "C" } arm_pid_instance_q31; /** + * @ingroup PID * @brief Instance structure for the floating-point PID Control. */ typedef struct @@ -271,12 +275,10 @@ extern "C" - /** - * @addtogroup PID - * @{ - */ + /** + * @ingroup PID * @brief Process function for the floating-point PID Control. * @param[in,out] S is an instance of the floating-point PID Control structure * @param[in] in input sample to process @@ -303,6 +305,7 @@ extern "C" } /** + @ingroup PID @brief Process function for the Q31 PID Control. @param[in,out] S points to an instance of the Q31 PID Control structure @param[in] in input sample to process @@ -348,6 +351,7 @@ __STATIC_FORCEINLINE q31_t arm_pid_q31( /** + @ingroup PID @brief Process function for the Q15 PID Control. @param[in,out] S points to an instance of the Q15 PID Control structure @param[in] in input sample to process @@ -400,9 +404,7 @@ __STATIC_FORCEINLINE q15_t arm_pid_q15( return (out); } - /** - * @} end of PID group - */ + /** * @ingroup groupController @@ -432,12 +434,10 @@ __STATIC_FORCEINLINE q15_t arm_pid_q15( * Refer to the function specific documentation below for usage guidelines. */ - /** - * @addtogroup park - * @{ - */ + /** + * @ingroup park * @brief Floating-point Park transform * @param[in] Ialpha input two-phase vector coordinate alpha * @param[in] Ibeta input two-phase vector coordinate beta @@ -467,6 +467,7 @@ __STATIC_FORCEINLINE q15_t arm_pid_q15( /** + @ingroup park @brief Park transform for Q31 version @param[in] Ialpha input two-phase vector coordinate alpha @param[in] Ibeta input two-phase vector coordinate beta @@ -512,9 +513,6 @@ __STATIC_FORCEINLINE void arm_park_q31( *pIq = __QSUB(product4, product3); } - /** - * @} end of park group - */ /** @@ -538,12 +536,10 @@ __STATIC_FORCEINLINE void arm_park_q31( * Refer to the function specific documentation below for usage guidelines. */ - /** - * @addtogroup inv_park - * @{ - */ + /** + * @ingroup inv_park * @brief Floating-point Inverse Park transform * @param[in] Id input coordinate of rotor reference frame d * @param[in] Iq input coordinate of rotor reference frame q @@ -570,6 +566,7 @@ __STATIC_FORCEINLINE void arm_park_q31( /** + @ingroup inv_park @brief Inverse Park transform for Q31 version @param[in] Id input coordinate of rotor reference frame d @param[in] Iq input coordinate of rotor reference frame q @@ -615,9 +612,6 @@ __STATIC_FORCEINLINE void arm_inv_park_q31( *pIbeta = __QADD(product4, product3); } - /** - * @} end of Inverse park group - */ /** * @ingroup groupController @@ -645,13 +639,10 @@ __STATIC_FORCEINLINE void arm_inv_park_q31( * Refer to the function specific documentation below for usage guidelines. */ - /** - * @addtogroup clarke - * @{ - */ /** * + * @ingroup clarke * @brief Floating-point Clarke transform * @param[in] Ia input three-phase coordinate a * @param[in] Ib input three-phase coordinate b @@ -674,6 +665,7 @@ __STATIC_FORCEINLINE void arm_inv_park_q31( /** + @ingroup clarke @brief Clarke transform for Q31 version @param[in] Ia input three-phase coordinate a @param[in] Ib input three-phase coordinate b @@ -707,9 +699,6 @@ __STATIC_FORCEINLINE void arm_clarke_q31( *pIbeta = __QADD(product1, product2); } - /** - * @} end of clarke group - */ /** @@ -732,12 +721,10 @@ __STATIC_FORCEINLINE void arm_clarke_q31( * Refer to the function specific documentation below for usage guidelines. */ - /** - * @addtogroup inv_clarke - * @{ - */ + /** + * @ingroup inv_clarke * @brief Floating-point Inverse Clarke transform * @param[in] Ialpha input two-phase orthogonal vector axis alpha * @param[in] Ibeta input two-phase orthogonal vector axis beta @@ -760,6 +747,7 @@ __STATIC_FORCEINLINE void arm_clarke_q31( /** + @ingroup inv_clarke @brief Inverse Clarke transform for Q31 version @param[in] Ialpha input two-phase orthogonal vector axis alpha @param[in] Ibeta input two-phase orthogonal vector axis beta @@ -793,9 +781,7 @@ __STATIC_FORCEINLINE void arm_inv_clarke_q31( *pIb = __QSUB(product2, product1); } - /** - * @} end of inv_clarke group - */ + diff --git a/Source/BasicMathFunctions/arm_abs_f16.c b/Source/BasicMathFunctions/arm_abs_f16.c index 0d6568b8..ef1ea158 100755 --- a/Source/BasicMathFunctions/arm_abs_f16.c +++ b/Source/BasicMathFunctions/arm_abs_f16.c @@ -33,19 +33,6 @@ @ingroup groupMath */ -/** - @defgroup BasicAbs Vector Absolute Value - - Computes the absolute value of a vector on an element-by-element basis. - -
-      pDst[n] = abs(pSrc[n]),   0 <= n < blockSize.
-  
- - The functions support in-place computation allowing the source and - destination pointers to reference the same memory buffer. - There are separate functions for floating-point, Q7, Q15, and Q31 data types. - */ /** @addtogroup BasicAbs diff --git a/Source/BasicMathFunctions/arm_add_f16.c b/Source/BasicMathFunctions/arm_add_f16.c index 2b2ae8f1..e2689e0b 100755 --- a/Source/BasicMathFunctions/arm_add_f16.c +++ b/Source/BasicMathFunctions/arm_add_f16.c @@ -32,17 +32,6 @@ @ingroup groupMath */ -/** - @defgroup BasicAdd Vector Addition - - Element-by-element addition of two vectors. - -
-      pDst[n] = pSrcA[n] + pSrcB[n],   0 <= n < blockSize.
-  
- - There are separate functions for floating-point, Q7, Q15, and Q31 data types. - */ /** @addtogroup BasicAdd diff --git a/Source/BasicMathFunctions/arm_dot_prod_f16.c b/Source/BasicMathFunctions/arm_dot_prod_f16.c index 55c88dfc..6137ae85 100755 --- a/Source/BasicMathFunctions/arm_dot_prod_f16.c +++ b/Source/BasicMathFunctions/arm_dot_prod_f16.c @@ -32,18 +32,6 @@ @ingroup groupMath */ -/** - @defgroup BasicDotProd Vector Dot Product - - Computes the dot product of two vectors. - The vectors are multiplied element-by-element and then summed. - -
-      sum = pSrcA[0]*pSrcB[0] + pSrcA[1]*pSrcB[1] + ... + pSrcA[blockSize-1]*pSrcB[blockSize-1]
-  
- - There are separate functions for floating-point, Q7, Q15, and Q31 data types. - */ /** @addtogroup BasicDotProd diff --git a/Source/BasicMathFunctions/arm_mult_f16.c b/Source/BasicMathFunctions/arm_mult_f16.c index c1115ac7..cac6d20b 100755 --- a/Source/BasicMathFunctions/arm_mult_f16.c +++ b/Source/BasicMathFunctions/arm_mult_f16.c @@ -32,17 +32,6 @@ @ingroup groupMath */ -/** - @defgroup BasicMult Vector Multiplication - - Element-by-element multiplication of two vectors. - -
-      pDst[n] = pSrcA[n] * pSrcB[n],   0 <= n < blockSize.
-  
- - There are separate functions for floating-point, Q7, Q15, and Q31 data types. - */ /** @addtogroup BasicMult diff --git a/Source/BasicMathFunctions/arm_negate_f16.c b/Source/BasicMathFunctions/arm_negate_f16.c index 187e511b..b24ffbc7 100755 --- a/Source/BasicMathFunctions/arm_negate_f16.c +++ b/Source/BasicMathFunctions/arm_negate_f16.c @@ -32,19 +32,6 @@ @ingroup groupMath */ -/** - @defgroup BasicNegate Vector Negate - - Negates the elements of a vector. - -
-      pDst[n] = -pSrc[n],   0 <= n < blockSize.
-  
- - The functions support in-place computation allowing the source and - destination pointers to reference the same memory buffer. - There are separate functions for floating-point, Q7, Q15, and Q31 data types. - */ /** @addtogroup BasicNegate diff --git a/Source/BasicMathFunctions/arm_offset_f16.c b/Source/BasicMathFunctions/arm_offset_f16.c index 9aeb1e75..7610dbcf 100755 --- a/Source/BasicMathFunctions/arm_offset_f16.c +++ b/Source/BasicMathFunctions/arm_offset_f16.c @@ -32,20 +32,6 @@ @ingroup groupMath */ -/** - @defgroup BasicOffset Vector Offset - - Adds a constant offset to each element of a vector. - -
-      pDst[n] = pSrc[n] + offset,   0 <= n < blockSize.
-  
- - The functions support in-place computation allowing the source and - destination pointers to reference the same memory buffer. - There are separate functions for floating-point, Q7, Q15, and Q31 data types. - */ - /** @addtogroup BasicOffset @{ diff --git a/Source/BasicMathFunctions/arm_scale_f16.c b/Source/BasicMathFunctions/arm_scale_f16.c index b4b1c334..1400d331 100755 --- a/Source/BasicMathFunctions/arm_scale_f16.c +++ b/Source/BasicMathFunctions/arm_scale_f16.c @@ -32,32 +32,7 @@ @ingroup groupMath */ -/** - @defgroup BasicScale Vector Scale - - Multiply a vector by a scalar value. For floating-point data, the algorithm used is: - -
-      pDst[n] = pSrc[n] * scale,   0 <= n < blockSize.
-  
- - In the fixed-point Q7, Q15, and Q31 functions, scale is represented by - a fractional multiplication scaleFract and an arithmetic shift shift. - The shift allows the gain of the scaling operation to exceed 1.0. - The algorithm used with fixed-point data is: -
-      pDst[n] = (pSrc[n] * scaleFract) << shift,   0 <= n < blockSize.
-  
- - The overall scale factor applied to the fixed-point data is -
-      scale = scaleFract * 2^shift.
-  
- - The functions support in-place computation allowing the source and destination - pointers to reference the same memory buffer. - */ /** @addtogroup BasicScale diff --git a/Source/BasicMathFunctions/arm_sub_f16.c b/Source/BasicMathFunctions/arm_sub_f16.c index 836ad43b..55493cff 100755 --- a/Source/BasicMathFunctions/arm_sub_f16.c +++ b/Source/BasicMathFunctions/arm_sub_f16.c @@ -32,17 +32,6 @@ @ingroup groupMath */ -/** - @defgroup BasicSub Vector Subtraction - - Element-by-element subtraction of two vectors. - -
-      pDst[n] = pSrcA[n] - pSrcB[n],   0 <= n < blockSize.
-  
- - There are separate functions for floating-point, Q7, Q15, and Q31 data types. - */ /** @addtogroup BasicSub diff --git a/Source/ComplexMathFunctions/arm_cmplx_conj_f16.c b/Source/ComplexMathFunctions/arm_cmplx_conj_f16.c index 6cf871e2..970d91f1 100755 --- a/Source/ComplexMathFunctions/arm_cmplx_conj_f16.c +++ b/Source/ComplexMathFunctions/arm_cmplx_conj_f16.c @@ -33,28 +33,6 @@ @ingroup groupCmplxMath */ -/** - @defgroup cmplx_conj Complex Conjugate - - Conjugates the elements of a complex data vector. - - The pSrc points to the source data and - pDst points to the destination data where the result should be written. - numSamples specifies the number of complex samples - and the data in each array is stored in an interleaved fashion - (real, imag, real, imag, ...). - Each array has a total of 2*numSamples values. - - The underlying algorithm is used: -
-  for (n = 0; n < numSamples; n++) {
-      pDst[(2*n)  ] =  pSrc[(2*n)  ];    // real part
-      pDst[(2*n)+1] = -pSrc[(2*n)+1];    // imag part
-  }
-  
- - There are separate functions for floating-point, Q15, and Q31 data types. - */ /** @addtogroup cmplx_conj diff --git a/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f16.c b/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f16.c index ff45a9fc..e80a2c0f 100755 --- a/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f16.c +++ b/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f16.c @@ -35,32 +35,6 @@ @ingroup groupCmplxMath */ -/** - @defgroup cmplx_dot_prod Complex Dot Product - - Computes the dot product of two complex vectors. - The vectors are multiplied element-by-element and then summed. - - The pSrcA points to the first complex input vector and - pSrcB points to the second complex input vector. - numSamples specifies the number of complex samples - and the data in each array is stored in an interleaved fashion - (real, imag, real, imag, ...). - Each array has a total of 2*numSamples values. - - The underlying algorithm is used: - -
-  realResult = 0;
-  imagResult = 0;
-  for (n = 0; n < numSamples; n++) {
-      realResult += pSrcA[(2*n)+0] * pSrcB[(2*n)+0] - pSrcA[(2*n)+1] * pSrcB[(2*n)+1];
-      imagResult += pSrcA[(2*n)+0] * pSrcB[(2*n)+1] + pSrcA[(2*n)+1] * pSrcB[(2*n)+0];
-  }
-  
- - There are separate functions for floating-point, Q15, and Q31 data types. - */ /** @addtogroup cmplx_dot_prod diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_f16.c b/Source/ComplexMathFunctions/arm_cmplx_mag_f16.c index 1f935987..38669340 100755 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_f16.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_f16.c @@ -33,29 +33,7 @@ @ingroup groupCmplxMath */ -/** - @defgroup cmplx_mag Complex Magnitude - - Computes the magnitude of the elements of a complex data vector. - - The pSrc points to the source data and - pDst points to the where the result should be written. - numSamples specifies the number of complex samples - in the input array and the data is stored in an interleaved fashion - (real, imag, real, imag, ...). - The input array has a total of 2*numSamples values; - the output array has a total of numSamples values. - - The underlying algorithm is used: -
-  for (n = 0; n < numSamples; n++) {
-      pDst[n] = sqrt(pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2);
-  }
-  
- - There are separate functions for floating-point, Q15, and Q31 data types. - */ /** @addtogroup cmplx_mag diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_f64.c b/Source/ComplexMathFunctions/arm_cmplx_mag_f64.c index c2bcd568..ba52e398 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_f64.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_f64.c @@ -32,29 +32,7 @@ @ingroup groupCmplxMath */ -/** - @defgroup cmplx_mag Complex Magnitude - - Computes the magnitude of the elements of a complex data vector. - - The pSrc points to the source data and - pDst points to the where the result should be written. - numSamples specifies the number of complex samples - in the input array and the data is stored in an interleaved fashion - (real, imag, real, imag, ...). - The input array has a total of 2*numSamples values; - the output array has a total of numSamples values. - - The underlying algorithm is used: -
-  for (n = 0; n < numSamples; n++) {
-      pDst[n] = sqrt(pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2);
-  }
-  
- - There are separate functions for floating-point, Q15, and Q31 data types. - */ /** @addtogroup cmplx_mag diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f16.c b/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f16.c index df3cbec9..fed7d2b2 100755 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f16.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f16.c @@ -34,29 +34,6 @@ @ingroup groupCmplxMath */ -/** - @defgroup cmplx_mag_squared Complex Magnitude Squared - - Computes the magnitude squared of the elements of a complex data vector. - - The pSrc points to the source data and - pDst points to the where the result should be written. - numSamples specifies the number of complex samples - in the input array and the data is stored in an interleaved fashion - (real, imag, real, imag, ...). - The input array has a total of 2*numSamples values; - the output array has a total of numSamples values. - - The underlying algorithm is used: - -
-  for (n = 0; n < numSamples; n++) {
-      pDst[n] = pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2;
-  }
-  
- - There are separate functions for floating-point, Q15, and Q31 data types. - */ /** @addtogroup cmplx_mag_squared diff --git a/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f16.c b/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f16.c index 68e1d1b9..fccc26ad 100755 --- a/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f16.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f16.c @@ -34,27 +34,7 @@ @ingroup groupCmplxMath */ -/** - @defgroup CmplxByCmplxMult Complex-by-Complex Multiplication - - Multiplies a complex vector by another complex vector and generates a complex result. - The data in the complex arrays is stored in an interleaved fashion - (real, imag, real, imag, ...). - The parameter numSamples represents the number of complex - samples processed. The complex arrays have a total of 2*numSamples - real values. - - The underlying algorithm is used: -
-  for (n = 0; n < numSamples; n++) {
-      pDst[(2*n)+0] = pSrcA[(2*n)+0] * pSrcB[(2*n)+0] - pSrcA[(2*n)+1] * pSrcB[(2*n)+1];
-      pDst[(2*n)+1] = pSrcA[(2*n)+0] * pSrcB[(2*n)+1] + pSrcA[(2*n)+1] * pSrcB[(2*n)+0];
-  }
-  
- - There are separate functions for floating-point, Q15, and Q31 data types. - */ /** @addtogroup CmplxByCmplxMult diff --git a/Source/ComplexMathFunctions/arm_cmplx_mult_real_f16.c b/Source/ComplexMathFunctions/arm_cmplx_mult_real_f16.c index f5909fc8..8182d3aa 100755 --- a/Source/ComplexMathFunctions/arm_cmplx_mult_real_f16.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mult_real_f16.c @@ -34,28 +34,6 @@ @ingroup groupCmplxMath */ -/** - @defgroup CmplxByRealMult Complex-by-Real Multiplication - - Multiplies a complex vector by a real vector and generates a complex result. - The data in the complex arrays is stored in an interleaved fashion - (real, imag, real, imag, ...). - The parameter numSamples represents the number of complex - samples processed. The complex arrays have a total of 2*numSamples - real values while the real array has a total of numSamples - real values. - - The underlying algorithm is used: - -
-  for (n = 0; n < numSamples; n++) {
-      pCmplxDst[(2*n)+0] = pSrcCmplx[(2*n)+0] * pSrcReal[n];
-      pCmplxDst[(2*n)+1] = pSrcCmplx[(2*n)+1] * pSrcReal[n];
-  }
-  
- - There are separate functions for floating-point, Q15, and Q31 data types. - */ /** @addtogroup CmplxByRealMult diff --git a/Source/FastMathFunctions/arm_divide_q31.c b/Source/FastMathFunctions/arm_divide_q31.c index 12b727f8..6397e32f 100755 --- a/Source/FastMathFunctions/arm_divide_q31.c +++ b/Source/FastMathFunctions/arm_divide_q31.c @@ -35,11 +35,6 @@ @ingroup groupFastMath */ -/** - @defgroup divide Fixed point division - - */ - /** @addtogroup divide @{ diff --git a/Source/FastMathFunctions/arm_sqrt_q15.c b/Source/FastMathFunctions/arm_sqrt_q15.c index defeebe8..64da54d8 100644 --- a/Source/FastMathFunctions/arm_sqrt_q15.c +++ b/Source/FastMathFunctions/arm_sqrt_q15.c @@ -29,6 +29,8 @@ #include "dsp/fast_math_functions.h" #include "arm_common_tables.h" +#define Q12QUARTER 0x2000 + /** @ingroup groupFastMath */ @@ -47,7 +49,6 @@ - \ref ARM_MATH_ARGUMENT_ERROR : input value is negative; *pOut is set to 0 */ -#define Q12QUARTER 0x2000 arm_status arm_sqrt_q15( q15_t in, q15_t * pOut) diff --git a/Source/FastMathFunctions/arm_sqrt_q31.c b/Source/FastMathFunctions/arm_sqrt_q31.c index 8747670d..99727371 100644 --- a/Source/FastMathFunctions/arm_sqrt_q31.c +++ b/Source/FastMathFunctions/arm_sqrt_q31.c @@ -29,6 +29,8 @@ #include "dsp/fast_math_functions.h" #include "arm_common_tables.h" +#define Q28QUARTER 0x20000000 + /** @ingroup groupFastMath */ @@ -46,7 +48,6 @@ - \ref ARM_MATH_SUCCESS : input value is positive - \ref ARM_MATH_ARGUMENT_ERROR : input value is negative; *pOut is set to 0 */ -#define Q28QUARTER 0x20000000 arm_status arm_sqrt_q31( q31_t in, diff --git a/Source/FastMathFunctions/arm_vexp_f16.c b/Source/FastMathFunctions/arm_vexp_f16.c index dd7c06ee..2adebbba 100755 --- a/Source/FastMathFunctions/arm_vexp_f16.c +++ b/Source/FastMathFunctions/arm_vexp_f16.c @@ -34,7 +34,18 @@ #include "arm_vec_math_f16.h" +/** + @addtogroup vexp + @{ + */ +/** + @brief Floating-point vector of exp values. + @param[in] pSrc points to the input vector + @param[out] pDst points to the output vector + @param[in] blockSize number of samples in each vector + @return none + */ void arm_vexp_f16( const float16_t * pSrc, float16_t * pDst, @@ -80,3 +91,6 @@ void arm_vexp_f16( #endif /* #if defined(ARM_FLOAT16_SUPPORTED) */ +/** + @} end of vexp group + */ \ No newline at end of file diff --git a/Source/FastMathFunctions/arm_vexp_f32.c b/Source/FastMathFunctions/arm_vexp_f32.c index 43b2a86d..83afb847 100755 --- a/Source/FastMathFunctions/arm_vexp_f32.c +++ b/Source/FastMathFunctions/arm_vexp_f32.c @@ -33,6 +33,28 @@ #include "arm_vec_math.h" #endif +/** + @ingroup groupFastMath + */ + +/** + @defgroup vexp Vector Exponential + + Compute the exp values of a vector of samples. +*/ + +/** + @addtogroup vexp + @{ + */ + +/** + @brief Floating-point vector of exp values. + @param[in] pSrc points to the input vector + @param[out] pDst points to the output vector + @param[in] blockSize number of samples in each vector + @return none + */ void arm_vexp_f32( const float32_t * pSrc, float32_t * pDst, @@ -95,3 +117,7 @@ void arm_vexp_f32( blkCnt--; } } + +/** + @} end of vexp group + */ \ No newline at end of file diff --git a/Source/FastMathFunctions/arm_vexp_f64.c b/Source/FastMathFunctions/arm_vexp_f64.c index 76f80ff5..8f27ad83 100644 --- a/Source/FastMathFunctions/arm_vexp_f64.c +++ b/Source/FastMathFunctions/arm_vexp_f64.c @@ -29,6 +29,18 @@ #include "dsp/fast_math_functions.h" #include "arm_common_tables.h" +/** + @addtogroup vexp + @{ + */ + +/** + @brief Floating-point vector of exp values. + @param[in] pSrc points to the input vector + @param[out] pDst points to the output vector + @param[in] blockSize number of samples in each vector + @return none + */ void arm_vexp_f64( const float64_t * pSrc, float64_t * pDst, @@ -49,3 +61,7 @@ void arm_vexp_f64( blkCnt--; } } + +/** + @} end of vexp group + */ \ No newline at end of file diff --git a/Source/FilteringFunctions/arm_conv_f32.c b/Source/FilteringFunctions/arm_conv_f32.c index 7f2dd81d..4ad864e6 100644 --- a/Source/FilteringFunctions/arm_conv_f32.c +++ b/Source/FilteringFunctions/arm_conv_f32.c @@ -78,6 +78,12 @@ @par Opt Versions Opt versions are supported for Q15 and Q7. Design uses internal scratch buffer for getting good optimisation. These versions are optimised in cycles and consumes more memory (Scratch memory) compared to Q15 and Q7 versions + + @par Long versions: + For convolution of long vectors, those functions are + no more adapted and will be very slow. + An implementation based upon FFTs should be used. + */ /** diff --git a/Source/FilteringFunctions/arm_conv_partial_f32.c b/Source/FilteringFunctions/arm_conv_partial_f32.c index a8a9bd1a..74f73ab2 100644 --- a/Source/FilteringFunctions/arm_conv_partial_f32.c +++ b/Source/FilteringFunctions/arm_conv_partial_f32.c @@ -56,6 +56,12 @@ @par Opt Versions Opt versions are supported for Q15 and Q7. Design uses internal scratch buffer for getting good optimisation. These versions are optimised in cycles and consumes more memory (Scratch memory) compared to Q15 and Q7 versions of partial convolution + + @par Long versions: + For convolution of long vectors, those functions are + no more adapted and will be very slow. + An implementation based upon FFTs should be used. + */ /** diff --git a/Source/FilteringFunctions/arm_correlate_f16.c b/Source/FilteringFunctions/arm_correlate_f16.c index 5924b7ac..76d6e9bd 100755 --- a/Source/FilteringFunctions/arm_correlate_f16.c +++ b/Source/FilteringFunctions/arm_correlate_f16.c @@ -33,51 +33,7 @@ @ingroup groupFilters */ -/** - @defgroup Corr Correlation - - Correlation is a mathematical operation that is similar to convolution. - As with convolution, correlation uses two signals to produce a third signal. - The underlying algorithms in correlation and convolution are identical except that one of the inputs is flipped in convolution. - Correlation is commonly used to measure the similarity between two signals. - It has applications in pattern recognition, cryptanalysis, and searching. - The CMSIS library provides correlation functions for Q7, Q15, Q31 and floating-point data types. - Fast versions of the Q15 and Q31 functions are also provided. - - @par Algorithm - Let a[n] and b[n] be sequences of length srcALen and srcBLen samples respectively. - The convolution of the two signals is denoted by -
-      c[n] = a[n] * b[n]
-  
- In correlation, one of the signals is flipped in time -
-       c[n] = a[n] * b[-n]
-  
- @par - and this is mathematically defined as - \image html CorrelateEquation.gif - @par - The pSrcA points to the first input vector of length srcALen and pSrcB points to the second input vector of length srcBLen. - The result c[n] is of length 2 * max(srcALen, srcBLen) - 1 and is defined over the interval n=0, 1, 2, ..., (2 * max(srcALen, srcBLen) - 2). - The output result is written to pDst and the calling function must allocate 2 * max(srcALen, srcBLen) - 1 words for the result. - - @note - The pDst should be initialized to all zeros before being used. - - @par Fixed-Point Behavior - Correlation requires summing up a large number of intermediate products. - As such, the Q7, Q15, and Q31 functions run a risk of overflow and saturation. - Refer to the function specific documentation below for further details of the particular algorithm used. - - @par Fast Versions - Fast versions are supported for Q31 and Q15. Cycles for Fast versions are less compared to Q31 and Q15 of correlate and the design requires - the input signals should be scaled down to avoid intermediate overflows. - - @par Opt Versions - Opt versions are supported for Q15 and Q7. Design uses internal scratch buffer for getting good optimisation. - These versions are optimised in cycles and consumes more memory (Scratch memory) compared to Q15 and Q7 versions of correlate - */ + /** @addtogroup Corr diff --git a/Source/FilteringFunctions/arm_correlate_f32.c b/Source/FilteringFunctions/arm_correlate_f32.c index 41a69a67..940d7ca4 100644 --- a/Source/FilteringFunctions/arm_correlate_f32.c +++ b/Source/FilteringFunctions/arm_correlate_f32.c @@ -76,6 +76,11 @@ @par Opt Versions Opt versions are supported for Q15 and Q7. Design uses internal scratch buffer for getting good optimisation. These versions are optimised in cycles and consumes more memory (Scratch memory) compared to Q15 and Q7 versions of correlate + + @par Long versions: + For convolution of long vectors, those functions are + no more adapted and will be very slow. + An implementation based upon FFTs should be used. */ /** diff --git a/Source/FilteringFunctions/arm_levinson_durbin_f16.c b/Source/FilteringFunctions/arm_levinson_durbin_f16.c index 36108c20..8e52ee2e 100755 --- a/Source/FilteringFunctions/arm_levinson_durbin_f16.c +++ b/Source/FilteringFunctions/arm_levinson_durbin_f16.c @@ -32,10 +32,7 @@ @ingroup groupFilters */ -/** - @defgroup LD Levinson Durbin Algorithm - */ /** @addtogroup LD diff --git a/Source/FilteringFunctions/arm_levinson_durbin_q31.c b/Source/FilteringFunctions/arm_levinson_durbin_q31.c index 1788d971..86b10b32 100755 --- a/Source/FilteringFunctions/arm_levinson_durbin_q31.c +++ b/Source/FilteringFunctions/arm_levinson_durbin_q31.c @@ -93,10 +93,7 @@ __STATIC_FORCEINLINE q31_t divide(q31_t n, q31_t d) @ingroup groupFilters */ -/** - @defgroup LD Levinson Durbin Algorithm - */ /** @addtogroup LD diff --git a/Source/InterpolationFunctions/arm_bilinear_interp_f16.c b/Source/InterpolationFunctions/arm_bilinear_interp_f16.c index 799ed78c..3ece81ca 100755 --- a/Source/InterpolationFunctions/arm_bilinear_interp_f16.c +++ b/Source/InterpolationFunctions/arm_bilinear_interp_f16.c @@ -35,57 +35,6 @@ @ingroup groupInterpolation */ -/** - * @defgroup BilinearInterpolate Bilinear Interpolation - * - * Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid. - * The underlying function f(x, y) is sampled on a regular grid and the interpolation process - * determines values between the grid points. - * Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension. - * Bilinear interpolation is often used in image processing to rescale images. - * The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types. - * - * Algorithm - * \par - * The instance structure used by the bilinear interpolation functions describes a two dimensional data table. - * For floating-point, the instance structure is defined as: - *
-   *   typedef struct
-   *   {
-   *     uint16_t numRows;
-   *     uint16_t numCols;
-   *     float16_t *pData;
-   * } arm_bilinear_interp_instance_f16;
-   * 
- * - * \par - * where numRows specifies the number of rows in the table; - * numCols specifies the number of columns in the table; - * and pData points to an array of size numRows*numCols values. - * The data table pTable is organized in row order and the supplied data values fall on integer indexes. - * That is, table element (x,y) is located at pTable[x + y*numCols] where x and y are integers. - * - * \par - * Let (x, y) specify the desired interpolation point. Then define: - *
-   *     XF = floor(x)
-   *     YF = floor(y)
-   * 
- * \par - * The interpolated output point is computed as: - *
-   *  f(x, y) = f(XF, YF) * (1-(x-XF)) * (1-(y-YF))
-   *           + f(XF+1, YF) * (x-XF)*(1-(y-YF))
-   *           + f(XF, YF+1) * (1-(x-XF))*(y-YF)
-   *           + f(XF+1, YF+1) * (x-XF)*(y-YF)
-   * 
- * Note that the coordinates (x, y) contain integer and fractional components. - * The integer components specify which portion of the table to use while the - * fractional components control the interpolation processor. - * - * \par - * if (x,y) are outside of the table boundary, Bilinear interpolation returns zero output. - */ /** diff --git a/Source/InterpolationFunctions/arm_linear_interp_f16.c b/Source/InterpolationFunctions/arm_linear_interp_f16.c index f4ae1e1e..804eec2b 100755 --- a/Source/InterpolationFunctions/arm_linear_interp_f16.c +++ b/Source/InterpolationFunctions/arm_linear_interp_f16.c @@ -35,37 +35,6 @@ @ingroup groupInterpolation */ -/** - * @defgroup LinearInterpolate Linear Interpolation - * - * Linear interpolation is a method of curve fitting using linear polynomials. - * Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line - * - * \par - * \image html LinearInterp.gif "Linear interpolation" - * - * \par - * A Linear Interpolate function calculates an output value(y), for the input(x) - * using linear interpolation of the input values x0, x1( nearest input values) and the output values y0 and y1(nearest output values) - * - * \par Algorithm: - *
-   *       y = y0 + (x - x0) * ((y1 - y0)/(x1-x0))
-   *       where x0, x1 are nearest values of input x
-   *             y0, y1 are nearest values to output y
-   * 
- * - * \par - * This set of functions implements Linear interpolation process - * for Q7, Q15, Q31, and floating-point data types. The functions operate on a single - * sample of data and each call to the function returns a single processed value. - * S points to an instance of the Linear Interpolate function data structure. - * x is the input sample value. The functions returns the output value. - * - * \par - * if x is outside of the table boundary, Linear interpolation returns first value of the table - * if x is below input range and returns last value of table if x is above range. - */ /** * @addtogroup LinearInterpolate diff --git a/Source/MatrixFunctions/arm_mat_init_q31.c b/Source/MatrixFunctions/arm_mat_init_q31.c index ab735d06..9031cdab 100644 --- a/Source/MatrixFunctions/arm_mat_init_q31.c +++ b/Source/MatrixFunctions/arm_mat_init_q31.c @@ -32,10 +32,7 @@ @ingroup groupMatrix */ -/** - @defgroup MatrixInit Matrix Initialization - - */ + /** @addtogroup MatrixInit diff --git a/Source/MatrixFunctions/arm_mat_mult_f32.c b/Source/MatrixFunctions/arm_mat_mult_f32.c index d1fd9eac..352ec21c 100644 --- a/Source/MatrixFunctions/arm_mat_mult_f32.c +++ b/Source/MatrixFunctions/arm_mat_mult_f32.c @@ -41,7 +41,27 @@ * * Multiplies two matrices. * - * \image html MatrixMultiplication.gif "Multiplication of two 3 x 3 matrices" + * @par Multiplication of two 3x3 matrices: + * + * \f[ + * \begin{pmatrix} + * a_{1,1} & a_{1,2} & a_{1,3} \\ + * a_{2,1} & a_{2,2} & a_{2,3} \\ + * a_{3,1} & a_{3,2} & a_{3,3} \\ + * \end{pmatrix} + * + * \begin{pmatrix} + * b_{1,1} & b_{1,2} & b_{1,3} \\ + * b_{2,1} & b_{2,2} & b_{2,3} \\ + * b_{3,1} & b_{3,2} & b_{3,3} \\ + * \end{pmatrix} + * = + * \begin{pmatrix} + * a_{1,1} b_{1,1}+a_{1,2} b_{2,1}+a_{1,3} b_{3,1} & a_{1,1} b_{1,2}+a_{1,2} b_{2,2}+a_{1,3} b_{3,2} & a_{1,1} b_{1,3}+a_{1,2} b_{2,3}+a_{1,3} b_{3,3} \\ + * a_{2,1} b_{1,1}+a_{2,2} b_{2,1}+a_{2,3} b_{3,1} & a_{2,1} b_{1,2}+a_{2,2} b_{2,2}+a_{2,3} b_{3,2} & a_{2,1} b_{1,3}+a_{2,2} b_{2,3}+a_{2,3} b_{3,3} \\ + * a_{3,1} b_{1,1}+a_{3,2} b_{2,1}+a_{3,3} b_{3,1} & a_{3,1} b_{1,2}+a_{3,2} b_{2,2}+a_{3,3} b_{3,2} & a_{3,1} b_{1,3}+a_{3,2} b_{2,3}+a_{3,3} b_{3,3} \\ + * \end{pmatrix} + * \f] * Matrix multiplication is only defined if the number of columns of the * first matrix equals the number of rows of the second matrix. diff --git a/Source/MatrixFunctions/arm_mat_mult_f64.c b/Source/MatrixFunctions/arm_mat_mult_f64.c index a7bdf2d5..ddc60101 100755 --- a/Source/MatrixFunctions/arm_mat_mult_f64.c +++ b/Source/MatrixFunctions/arm_mat_mult_f64.c @@ -32,23 +32,6 @@ * @ingroup groupMatrix */ -/** - * @defgroup MatrixMult Matrix Multiplication - * - * Multiplies two matrices. - * - * \image html MatrixMultiplication.gif "Multiplication of two 3 x 3 matrices" - - * Matrix multiplication is only defined if the number of columns of the - * first matrix equals the number of rows of the second matrix. - * Multiplying an M x N matrix with an N x P matrix results - * in an M x P matrix. - * When matrix size checking is enabled, the functions check: (1) that the inner dimensions of - * pSrcA and pSrcB are equal; and (2) that the size of the output - * matrix equals the outer dimensions of pSrcA and pSrcB. - */ - - /** * @addtogroup MatrixMult * @{ diff --git a/Source/MatrixFunctions/arm_mat_sub_f64.c b/Source/MatrixFunctions/arm_mat_sub_f64.c index 245a76d0..35b4f957 100755 --- a/Source/MatrixFunctions/arm_mat_sub_f64.c +++ b/Source/MatrixFunctions/arm_mat_sub_f64.c @@ -32,16 +32,6 @@ @ingroup groupMatrix */ -/** - @defgroup MatrixSub Matrix Subtraction - - Subtract two matrices. - \image html MatrixSubtraction.gif "Subraction of two 3 x 3 matrices" - - The functions check to make sure that - pSrcA, pSrcB, and pDst have the same - number of rows and columns. - */ /** @addtogroup MatrixSub diff --git a/Source/MatrixFunctions/arm_mat_trans_f64.c b/Source/MatrixFunctions/arm_mat_trans_f64.c index 57b5043f..fee5a074 100755 --- a/Source/MatrixFunctions/arm_mat_trans_f64.c +++ b/Source/MatrixFunctions/arm_mat_trans_f64.c @@ -32,14 +32,7 @@ @ingroup groupMatrix */ -/** - @defgroup MatrixTrans Matrix Transpose - - Tranposes a matrix. - Transposing an M x N matrix flips it around the center diagonal and results in an N x M matrix. - \image html MatrixTranspose.gif "Transpose of a 3 x 3 matrix" - */ /** @addtogroup MatrixTrans diff --git a/Source/SVMFunctions/arm_svm_linear_init_f16.c b/Source/SVMFunctions/arm_svm_linear_init_f16.c index a3ebc7f7..260177f0 100755 --- a/Source/SVMFunctions/arm_svm_linear_init_f16.c +++ b/Source/SVMFunctions/arm_svm_linear_init_f16.c @@ -33,20 +33,11 @@ #include #include -/** - * @defgroup groupSVM SVM Functions - * - */ /** @ingroup groupSVM */ -/** - @defgroup linearsvm Linear SVM - - Linear SVM classifier - */ /** * @addtogroup linearsvm diff --git a/Source/SVMFunctions/arm_svm_polynomial_init_f16.c b/Source/SVMFunctions/arm_svm_polynomial_init_f16.c index 558ab450..03e7f5ed 100755 --- a/Source/SVMFunctions/arm_svm_polynomial_init_f16.c +++ b/Source/SVMFunctions/arm_svm_polynomial_init_f16.c @@ -37,11 +37,6 @@ @ingroup groupSVM */ -/** - @defgroup polysvm Polynomial SVM - - Polynomial SVM classifier - */ /** * @addtogroup polysvm diff --git a/Source/SVMFunctions/arm_svm_rbf_init_f16.c b/Source/SVMFunctions/arm_svm_rbf_init_f16.c index 43de2498..fe4f8851 100755 --- a/Source/SVMFunctions/arm_svm_rbf_init_f16.c +++ b/Source/SVMFunctions/arm_svm_rbf_init_f16.c @@ -37,11 +37,6 @@ @ingroup groupSVM */ -/** - @defgroup rbfsvm RBF SVM - - RBF SVM classifier - */ /** diff --git a/Source/SVMFunctions/arm_svm_sigmoid_init_f16.c b/Source/SVMFunctions/arm_svm_sigmoid_init_f16.c index 7a27417f..c43379a8 100755 --- a/Source/SVMFunctions/arm_svm_sigmoid_init_f16.c +++ b/Source/SVMFunctions/arm_svm_sigmoid_init_f16.c @@ -37,11 +37,6 @@ @ingroup groupSVM */ -/** - @defgroup sigmoidsvm Sigmoid SVM - - Sigmoid SVM classifier - */ /** * @addtogroup sigmoidsvm diff --git a/Source/StatisticsFunctions/arm_rms_f16.c b/Source/StatisticsFunctions/arm_rms_f16.c index 42a00efb..1c2ea697 100755 --- a/Source/StatisticsFunctions/arm_rms_f16.c +++ b/Source/StatisticsFunctions/arm_rms_f16.c @@ -35,18 +35,7 @@ @ingroup groupStats */ -/** - @defgroup RMS Root mean square (RMS) - - Calculates the Root Mean Square of the elements in the input vector. - The underlying algorithm is used: -
-      Result = sqrt(((pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] * pSrc[blockSize-1]) / blockSize));
-  
- - There are separate functions for floating point, Q31, and Q15 data types. - */ /** @addtogroup RMS diff --git a/Source/TransformFunctions/arm_rfft_fast_f16.c b/Source/TransformFunctions/arm_rfft_fast_f16.c index 9048f835..1a603fad 100755 --- a/Source/TransformFunctions/arm_rfft_fast_f16.c +++ b/Source/TransformFunctions/arm_rfft_fast_f16.c @@ -467,99 +467,6 @@ void merge_rfft_f16( @ingroup groupTransforms */ -/** - @defgroup RealFFT Real FFT Functions - - @par - The CMSIS DSP library includes specialized algorithms for computing the - FFT of real data sequences. The FFT is defined over complex data but - in many applications the input is real. Real FFT algorithms take advantage - of the symmetry properties of the FFT and have a speed advantage over complex - algorithms of the same length. - @par - The Fast RFFT algorithm relays on the mixed radix CFFT that save processor usage. - @par - The real length N forward FFT of a sequence is computed using the steps shown below. - @par - \image html RFFT.gif "Real Fast Fourier Transform" - @par - The real sequence is initially treated as if it were complex to perform a CFFT. - Later, a processing stage reshapes the data to obtain half of the frequency spectrum - in complex format. Except the first complex number that contains the two real numbers - X[0] and X[N/2] all the data is complex. In other words, the first complex sample - contains two real values packed. - @par - The input for the inverse RFFT should keep the same format as the output of the - forward RFFT. A first processing stage pre-process the data to later perform an - inverse CFFT. - @par - \image html RIFFT.gif "Real Inverse Fast Fourier Transform" - @par - The algorithms for floating-point, Q15, and Q31 data are slightly different - and we describe each algorithm in turn. - @par Floating-point - The main functions are \ref arm_rfft_fast_f16() and \ref arm_rfft_fast_init_f16(). - - @par - The FFT of a real N-point sequence has even symmetry in the frequency domain. - The second half of the data equals the conjugate of the first half flipped in frequency. - Looking at the data, we see that we can uniquely represent the FFT using only N/2 complex numbers. - These are packed into the output array in alternating real and imaginary components: - @par - X = { real[0], imag[0], real[1], imag[1], real[2], imag[2] ... - real[(N/2)-1], imag[(N/2)-1 } - @par - It happens that the first complex number (real[0], imag[0]) is actually - all real. real[0] represents the DC offset, and imag[0] should be 0. - (real[1], imag[1]) is the fundamental frequency, (real[2], imag[2]) is - the first harmonic and so on. - @par - The real FFT functions pack the frequency domain data in this fashion. - The forward transform outputs the data in this form and the inverse - transform expects input data in this form. The function always performs - the needed bitreversal so that the input and output data is always in - normal order. The functions support lengths of [32, 64, 128, ..., 4096] - samples. - @par Q15 and Q31 - The real algorithms are defined in a similar manner and utilize N/2 complex - transforms behind the scenes. - @par - The complex transforms used internally include scaling to prevent fixed-point - overflows. The overall scaling equals 1/(fftLen/2). - Due to the use of complex transform internally, the source buffer is - modified by the rfft. - @par - A separate instance structure must be defined for each transform used but - twiddle factor and bit reversal tables can be reused. - @par - There is also an associated initialization function for each data type. - The initialization function performs the following operations: - - Sets the values of the internal structure fields. - - Initializes twiddle factor table and bit reversal table pointers. - - Initializes the internal complex FFT data structure. - @par - Use of the initialization function is optional **except for MVE versions where it is mandatory**. - If you don't use the initialization functions, then the structures should be initialized with code - similar to the one below: -
-      arm_rfft_instance_q31 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};
-      arm_rfft_instance_q15 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};
-  
- where fftLenReal is the length of the real transform; - fftLenBy2 length of the internal complex transform (fftLenReal/2). - ifftFlagR Selects forward (=0) or inverse (=1) transform. - bitReverseFlagR Selects bit reversed output (=0) or normal order - output (=1). - twidCoefRModifier stride modifier for the twiddle factor table. - The value is based on the FFT length; - pTwiddleARealpoints to the A array of twiddle coefficients; - pTwiddleBRealpoints to the B array of twiddle coefficients; - pCfft points to the CFFT Instance structure. The CFFT structure - must also be initialized. -@par - Note that with MVE versions you can't initialize instance structures directly and **must - use the initialization function**. - */ /** @addtogroup RealFFT diff --git a/Source/TransformFunctions/arm_rfft_fast_f32.c b/Source/TransformFunctions/arm_rfft_fast_f32.c index 67125043..3e94d5b4 100644 --- a/Source/TransformFunctions/arm_rfft_fast_f32.c +++ b/Source/TransformFunctions/arm_rfft_fast_f32.c @@ -495,6 +495,8 @@ void merge_rfft_f32( The main functions are \ref arm_rfft_fast_f32() and \ref arm_rfft_fast_init_f32(). The older functions \ref arm_rfft_f32() and \ref arm_rfft_init_f32() have been deprecated but are still documented. + For f16, the functions are \ref arm_rfft_fast_f16() and \ref arm_rfft_fast_init_f16(). + For f64, the functions are \ref arm_rfft_fast_f64() and \ref arm_rfft_fast_init_f64(). @par The FFT of a real N-point sequence has even symmetry in the frequency domain. The second half of the data equals the conjugate of the first half flipped in frequency. diff --git a/Source/TransformFunctions/arm_rfft_q15.c b/Source/TransformFunctions/arm_rfft_q15.c index 7d149c60..d0b99ed6 100644 --- a/Source/TransformFunctions/arm_rfft_q15.c +++ b/Source/TransformFunctions/arm_rfft_q15.c @@ -64,10 +64,34 @@ void arm_split_rifft_q15( Internally input is downscaled by 2 for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different RFFT sizes. The input and output formats for different RFFT sizes and number of bits to upscale are mentioned in the tables below for RFFT and RIFFT: - @par - \image html RFFTQ15.gif "Input and Output Formats for Q15 RFFT" - @par - \image html RIFFTQ15.gif "Input and Output Formats for Q15 RIFFT" + @par Input and Output formats for RFFT Q15 + +| RFFT Size | Input Format | Output Format | Number of bits to upscale | +| ---------: | ------------: | -------------: | ------------------------: | +| 32 | 1.15 | 5.11 | 5 | +| 64 | 1.15 | 6.10 | 6 | +| 128 | 1.15 | 7.9 | 7 | +| 256 | 1.15 | 8.8 | 8 | +| 512 | 1.15 | 9.7 | 9 | +| 1024 | 1.15 | 10.6 | 10 | +| 2048 | 1.15 | 11.5 | 11 | +| 4096 | 1.15 | 12.4 | 12 | +| 8192 | 1.15 | 13.3 | 13 | + + @par Input and Output formats for RIFFT Q15 + +| RIFFT Size | Input Format | Output Format | Number of bits to upscale | +| ----------: | ------------: | -------------: | ------------------------: | +| 32 | 1.15 | 5.11 | 0 | +| 64 | 1.15 | 6.10 | 0 | +| 128 | 1.15 | 7.9 | 0 | +| 256 | 1.15 | 8.8 | 0 | +| 512 | 1.15 | 9.7 | 0 | +| 1024 | 1.15 | 10.6 | 0 | +| 2048 | 1.15 | 11.5 | 0 | +| 4096 | 1.15 | 12.4 | 0 | +| 8192 | 1.15 | 13.3 | 0 | + @par If the input buffer is of length N, the output buffer must have length 2*N. The input buffer is modified by this function. diff --git a/Source/TransformFunctions/arm_rfft_q31.c b/Source/TransformFunctions/arm_rfft_q31.c index ad3212db..483b8514 100644 --- a/Source/TransformFunctions/arm_rfft_q31.c +++ b/Source/TransformFunctions/arm_rfft_q31.c @@ -64,10 +64,34 @@ void arm_split_rifft_q31( Internally input is downscaled by 2 for every stage to avoid saturations inside CFFT/CIFFT process. Hence the output format is different for different RFFT sizes. The input and output formats for different RFFT sizes and number of bits to upscale are mentioned in the tables below for RFFT and RIFFT: - @par - \image html RFFTQ31.gif "Input and Output Formats for Q31 RFFT" - @par - \image html RIFFTQ31.gif "Input and Output Formats for Q31 RIFFT" + @par Input and Output formats for RFFT Q31 + +| RFFT Size | Input Format | Output Format | Number of bits to upscale | +| ---------: | ------------: | -------------: | ------------------------: | +| 32 | 1.31 | 5.27 | 5 | +| 64 | 1.31 | 6.26 | 6 | +| 128 | 1.31 | 7.25 | 7 | +| 256 | 1.31 | 8.24 | 8 | +| 512 | 1.31 | 9.23 | 9 | +| 1024 | 1.31 | 10.22 | 10 | +| 2048 | 1.31 | 11.21 | 11 | +| 4096 | 1.31 | 12.20 | 12 | +| 8192 | 1.31 | 13.19 | 13 | + + @par Input and Output formats for RIFFT Q31 + +| RIFFT Size | Input Format | Output Format | Number of bits to upscale | +| ----------: | ------------: | -------------: | ------------------------: | +| 32 | 1.31 | 5.27 | 0 | +| 64 | 1.31 | 6.26 | 0 | +| 128 | 1.31 | 7.25 | 0 | +| 256 | 1.31 | 8.24 | 0 | +| 512 | 1.31 | 9.23 | 0 | +| 1024 | 1.31 | 10.22 | 0 | +| 2048 | 1.31 | 11.21 | 0 | +| 4096 | 1.31 | 12.20 | 0 | +| 8192 | 1.31 | 13.19 | 0 | + @par If the input buffer is of length N, the output buffer must have length 2*N. The input buffer is modified by this function.