Removing defgroup from f64 & fixing double init values

pull/19/head
JbR 4 years ago committed by Christophe Favergeon
parent 193adbe24b
commit 329dae5fad

@ -33,20 +33,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicAbs Vector Absolute Value
Computes the absolute value of a vector on an element-by-element basis.
<pre>
pDst[n] = abs(pSrc[n]), 0 <= n < blockSize.
</pre>
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
@{

@ -32,18 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicAdd Vector Addition
Element-by-element addition of two vectors.
<pre>
pDst[n] = pSrcA[n] + pSrcB[n], 0 <= n < blockSize.
</pre>
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicAdd
@{

@ -32,19 +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.
<pre>
sum = pSrcA[0]*pSrcB[0] + pSrcA[1]*pSrcB[1] + ... + pSrcA[blockSize-1]*pSrcB[blockSize-1]
</pre>
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicDotProd
@{

@ -32,18 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicMult Vector Multiplication
Element-by-element multiplication of two vectors.
<pre>
pDst[n] = pSrcA[n] * pSrcB[n], 0 <= n < blockSize.
</pre>
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicMult
@{

@ -32,20 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicNegate Vector Negate
Negates the elements of a vector.
<pre>
pDst[n] = -pSrc[n], 0 <= n < blockSize.
</pre>
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
@{

@ -32,20 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicOffset Vector Offset
Adds a constant offset to each element of a vector.
<pre>
pDst[n] = pSrc[n] + offset, 0 <= n < blockSize.
</pre>
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
@{

@ -32,33 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicScale Vector Scale
Multiply a vector by a scalar value. For floating-point data, the algorithm used is:
<pre>
pDst[n] = pSrc[n] * scale, 0 <= n < blockSize.
</pre>
In the fixed-point Q7, Q15, and Q31 functions, <code>scale</code> is represented by
a fractional multiplication <code>scaleFract</code> and an arithmetic shift <code>shift</code>.
The shift allows the gain of the scaling operation to exceed 1.0.
The algorithm used with fixed-point data is:
<pre>
pDst[n] = (pSrc[n] * scaleFract) << shift, 0 <= n < blockSize.
</pre>
The overall scale factor applied to the fixed-point data is
<pre>
scale = scaleFract * 2^shift.
</pre>
The functions support in-place computation allowing the source and destination
pointers to reference the same memory buffer.
*/
/**
@addtogroup BasicScale
@{

@ -32,18 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicSub Vector Subtraction
Element-by-element subtraction of two vectors.
<pre>
pDst[n] = pSrcA[n] - pSrcB[n], 0 <= n < blockSize.
</pre>
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicSub
@{

@ -32,30 +32,6 @@
@ingroup groupCmplxMath
*/
/**
@defgroup cmplx_mag_squared Complex Magnitude Squared
Computes the magnitude squared of the elements of a complex data vector.
The <code>pSrc</code> points to the source data and
<code>pDst</code> points to the where the result should be written.
<code>numSamples</code> 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 <code>2*numSamples</code> values;
the output array has a total of <code>numSamples</code> values.
The underlying algorithm is used:
<pre>
for (n = 0; n < numSamples; n++) {
pDst[n] = pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2;
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup cmplx_mag_squared
@{

@ -32,28 +32,6 @@
@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 <code>numSamples</code> represents the number of complex
samples processed. The complex arrays have a total of <code>2*numSamples</code>
real values.
The underlying algorithm is used:
<pre>
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];
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup CmplxByCmplxMult
@{

@ -49,7 +49,7 @@ float64_t arm_cityblock_distance_f64(const float64_t *pA,const float64_t *pB, ui
{
float64_t accum,tmpA, tmpB;
accum = 0.0f;
accum = 0.;
while(blockSize > 0)
{
tmpA = *pA++;

@ -59,7 +59,7 @@ float64_t arm_cosine_distance_f64(const float64_t *pA,const float64_t *pB, uint3
arm_dot_prod_f64(pA,pB,blockSize,&dot);
tmp = sqrt(pwra * pwrb);
return(1.0f - dot / tmp);
return(1. - dot / tmp);
}

@ -49,7 +49,7 @@
*/
float64_t arm_euclidean_distance_f64(const float64_t *pA,const float64_t *pB, uint32_t blockSize)
{
float64_t accum=0.0f,tmp;
float64_t accum=0.,tmp;
while(blockSize > 0)
{

@ -32,52 +32,6 @@
@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 <code>a[n]</code> and <code>b[n]</code> be sequences of length <code>srcALen</code> and <code>srcBLen</code> samples respectively.
The convolution of the two signals is denoted by
<pre>
c[n] = a[n] * b[n]
</pre>
In correlation, one of the signals is flipped in time
<pre>
c[n] = a[n] * b[-n]
</pre>
@par
and this is mathematically defined as
\image html CorrelateEquation.gif
@par
The <code>pSrcA</code> points to the first input vector of length <code>srcALen</code> and <code>pSrcB</code> points to the second input vector of length <code>srcBLen</code>.
The result <code>c[n]</code> is of length <code>2 * max(srcALen, srcBLen) - 1</code> and is defined over the interval <code>n=0, 1, 2, ..., (2 * max(srcALen, srcBLen) - 2)</code>.
The output result is written to <code>pDst</code> and the calling function must allocate <code>2 * max(srcALen, srcBLen) - 1</code> words for the result.
@note
The <code>pDst</code> 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
@{
@ -209,7 +163,7 @@ void arm_correlate_f64(
while (blockSize1 > 0U)
{
/* Accumulator is made zero for every iteration */
sum = 0.0f;
sum = 0.;
/* Initialize k with number of samples */
k = count;
@ -274,7 +228,7 @@ void arm_correlate_f64(
while (blkCnt > 0U)
{
/* Accumulator is made zero for every iteration */
sum = 0.0f;
sum = 0.;
/* Initialize blkCnt with number of samples */
k = srcBLen;
@ -314,7 +268,7 @@ void arm_correlate_f64(
while (blkCnt > 0U)
{
/* Accumulator is made zero for every iteration */
sum = 0.0f;
sum = 0.;
/* Loop over srcBLen */
k = srcBLen;
@ -375,7 +329,7 @@ void arm_correlate_f64(
while (blockSize3 > 0U)
{
/* Accumulator is made zero for every iteration */
sum = 0.0f;
sum = 0.;
/* Initialize blkCnt with number of samples */
k = count;

@ -74,7 +74,7 @@ void arm_fir_f64(
*pStateCurnt++ = *pSrc++;
/* Set the accumulator to zero */
acc0 = 0.0f;
acc0 = 0.;
/* Initialize state pointer */
px = pState;

@ -32,14 +32,6 @@
@ingroup groupStats
*/
/**
@defgroup AbsMax Absolute Maximum
Computes the maximum value of absolute values of an array of data.
The function returns both the maximum value and its position within the array.
There are separate functions for floating-point, Q31, Q15, and Q7 data types.
*/
/**
@addtogroup AbsMax
@{

@ -32,14 +32,6 @@
@ingroup groupStats
*/
/**
@defgroup AbsMin Absolute Minimum
Computes the minimum value of absolute values of an array of data.
The function returns both the minimum value and its position within the array.
There are separate functions for floating-point, Q31, Q15, and Q7 data types.
*/
/**
@addtogroup AbsMin
@{

@ -32,14 +32,6 @@
@ingroup groupStats
*/
/**
@defgroup Max Maximum
Computes the maximum value of an array of data.
The function returns both the maximum value and its position within the array.
There are separate functions for floating-point, Q31, Q15, and Q7 data types.
*/
/**
@addtogroup Max
@{

@ -51,7 +51,7 @@ void arm_mean_f64(
float64_t * pResult)
{
uint32_t blkCnt; /* Loop counter */
float64_t sum = 0.0f; /* Temporary result storage */
float64_t sum = 0.; /* Temporary result storage */
/* Initialize blkCnt with number of samples */
blkCnt = blockSize;

@ -32,14 +32,6 @@
@ingroup groupStats
*/
/**
@defgroup Min Minimum
Computes the minimum value of an array of data.
The function returns both the minimum value and its position within the array.
There are separate functions for floating-point, Q31, Q15, and Q7 data types.
*/
/**
@addtogroup Min
@{

@ -32,23 +32,6 @@
@ingroup groupStats
*/
/**
@defgroup power Power
Calculates the sum of the squares of the elements in the input vector.
The underlying algorithm is used:
<pre>
Result = pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + pSrc[2] * pSrc[2] + ... + pSrc[blockSize-1] * pSrc[blockSize-1];
</pre>
There are separate functions for floating point, Q31, Q15, and Q7 data types.
Since the result is not divided by the length, those functions are in fact computing
something which is more an energy than a power.
*/
/**
@addtogroup power
@{
@ -67,7 +50,7 @@ void arm_power_f64(
float64_t * pResult)
{
uint32_t blkCnt; /* Loop counter */
float64_t sum = 0.0f; /* Temporary result storage */
float64_t sum = 0.; /* Temporary result storage */
float64_t in; /* Temporary variable to store input value */
/* Initialize blkCnt with number of samples */

@ -32,30 +32,6 @@
@ingroup groupStats
*/
/**
@defgroup STD Standard deviation
Calculates the standard deviation of the elements in the input vector.
The float implementation is relying on arm_var_f32 which is using a two-pass algorithm
to avoid problem of numerical instabilities and cancellation errors.
Fixed point versions are using the standard textbook algorithm since the fixed point
numerical behavior is different from the float one.
Algorithm for fixed point versions is summarized below:
<pre>
Result = sqrt((sumOfSquares - sum<sup>2</sup> / blockSize) / (blockSize - 1))
sumOfSquares = pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] * pSrc[blockSize-1]
sum = pSrc[0] + pSrc[1] + pSrc[2] + ... + pSrc[blockSize-1]
</pre>
There are separate functions for floating point, Q31, and Q15 data types.
*/
/**
@addtogroup STD
@{

@ -32,21 +32,6 @@
@ingroup groupStats
*/
/**
@defgroup variance Variance
Calculates the variance of the elements in the input vector.
The underlying algorithm used is the direct method sometimes referred to as the two-pass method:
<pre>
Result = sum(element - meanOfElements)^2) / numElement - 1
meanOfElements = ( pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] ) / blockSize
</pre>
There are separate functions for floating point, Q31, and Q15 data types.
*/
/**
@addtogroup variance
@{
@ -65,8 +50,8 @@ void arm_var_f64(
float64_t * pResult)
{
uint32_t blkCnt; /* Loop counter */
float64_t sum = 0.0f; /* Temporary result storage */
float64_t fSum = 0.0f;
float64_t sum = 0.; /* Temporary result storage */
float64_t fSum = 0.;
float64_t fMean, fValue;
const float64_t * pInput = pSrc;
@ -107,7 +92,7 @@ void arm_var_f64(
}
/* Variance */
*pResult = fSum / (float64_t)(blockSize - 1.0f);
*pResult = fSum / (float64_t)(blockSize - 1.);
}
/**

@ -32,18 +32,6 @@
@ingroup groupSupport
*/
/**
@defgroup copy Vector Copy
Copies sample by sample from source vector to destination vector.
<pre>
pDst[n] = pSrc[n]; 0 <= n < blockSize.
</pre>
There are separate functions for floating point, Q31, Q15, and Q7 data types.
*/
/**
@addtogroup copy
@{

@ -32,18 +32,6 @@
@ingroup groupSupport
*/
/**
@defgroup Fill Vector Fill
Fills the destination vector with a constant value.
<pre>
pDst[n] = value; 0 <= n < blockSize.
</pre>
There are separate functions for floating point, Q31, Q15, and Q7 data types.
*/
/**
@addtogroup Fill
@{

Loading…
Cancel
Save