From 96d6da4e252b06dcfdc041e7df23e86161c33007 Mon Sep 17 00:00:00 2001 From: rihab kouki Date: Tue, 28 Jul 2020 11:24:49 +0100 Subject: Official ARM version: v5.6.0 --- docs/DSP/html/group__cmplx__dot__prod.html | 94 +++++++++++++++--------------- 1 file changed, 46 insertions(+), 48 deletions(-) (limited to 'docs/DSP/html/group__cmplx__dot__prod.html') diff --git a/docs/DSP/html/group__cmplx__dot__prod.html b/docs/DSP/html/group__cmplx__dot__prod.html index e51be96..ad1b23d 100644 --- a/docs/DSP/html/group__cmplx__dot__prod.html +++ b/docs/DSP/html/group__cmplx__dot__prod.html @@ -32,7 +32,7 @@ Logo
CMSIS-DSP -  Version 1.5.2 +  Version 1.7.0
CMSIS DSP Software Library
@@ -116,43 +116,43 @@ $(document).ready(function(){initNavTree('group__cmplx__dot__prod.html','');}); - - - - - - - - - + + + + + + + + +

Functions

void arm_cmplx_dot_prod_f32 (float32_t *pSrcA, float32_t *pSrcB, uint32_t numSamples, float32_t *realResult, float32_t *imagResult)
 Floating-point complex dot product. More...
 
void arm_cmplx_dot_prod_q15 (q15_t *pSrcA, q15_t *pSrcB, uint32_t numSamples, q31_t *realResult, q31_t *imagResult)
 Q15 complex dot product. More...
 
void arm_cmplx_dot_prod_q31 (q31_t *pSrcA, q31_t *pSrcB, uint32_t numSamples, q63_t *realResult, q63_t *imagResult)
 Q31 complex dot product. More...
 
void arm_cmplx_dot_prod_f32 (const float32_t *pSrcA, const float32_t *pSrcB, uint32_t numSamples, float32_t *realResult, float32_t *imagResult)
 Floating-point complex dot product. More...
 
void arm_cmplx_dot_prod_q15 (const q15_t *pSrcA, const q15_t *pSrcB, uint32_t numSamples, q31_t *realResult, q31_t *imagResult)
 Q15 complex dot product. More...
 
void arm_cmplx_dot_prod_q31 (const q31_t *pSrcA, const q31_t *pSrcB, uint32_t numSamples, q63_t *realResult, q63_t *imagResult)
 Q31 complex dot product. More...
 

Description

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:

+

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];
+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.

Function Documentation

- +
- + - + @@ -182,32 +182,32 @@ for(n=0; n<numSamples; n++) {
Parameters
void arm_cmplx_dot_prod_f32 (float32_tconst float32_t pSrcA,
float32_tconst float32_t pSrcB,
- - - - - + + + + +
*pSrcApoints to the first input vector
*pSrcBpoints to the second input vector
numSamplesnumber of complex samples in each vector
*realResultreal part of the result returned here
*imagResultimaginary part of the result returned here
[in]pSrcApoints to the first input vector
[in]pSrcBpoints to the second input vector
[in]numSamplesnumber of samples in each vector
[out]realResultreal part of the result returned here
[out]imagResultimaginary part of the result returned here
-
Returns
none.
+
Returns
none
- +
- + - + @@ -237,34 +237,33 @@ for(n=0; n<numSamples; n++) {
Parameters
void arm_cmplx_dot_prod_q15 (q15_tconst q15_t pSrcA,
q15_tconst q15_t pSrcB,
- - - - - + + + + +
*pSrcApoints to the first input vector
*pSrcBpoints to the second input vector
numSamplesnumber of complex samples in each vector
*realResultreal part of the result returned here
*imagResultimaginary part of the result returned here
[in]pSrcApoints to the first input vector
[in]pSrcBpoints to the second input vector
[in]numSamplesnumber of samples in each vector
[out]realResultreal part of the result returned here
[out]imagResultimaginary part of the result returned her
-
Returns
none.
-

Scaling and Overflow Behavior:

-
The function is implemented using an internal 64-bit accumulator. The intermediate 1.15 by 1.15 multiplications are performed with full precision and yield a 2.30 result. These are accumulated in a 64-bit accumulator with 34.30 precision. As a final step, the accumulators are converted to 8.24 format. The return results realResult and imagResult are in 8.24 format.
+
Returns
none
+
Scaling and Overflow Behavior
The function is implemented using an internal 64-bit accumulator. The intermediate 1.15 by 1.15 multiplications are performed with full precision and yield a 2.30 result. These are accumulated in a 64-bit accumulator with 34.30 precision. As a final step, the accumulators are converted to 8.24 format. The return results realResult and imagResult are in 8.24 format.
- +
- + - + @@ -294,17 +293,16 @@ for(n=0; n<numSamples; n++) {
Parameters
void arm_cmplx_dot_prod_q31 (q31_tconst q31_t pSrcA,
q31_tconst q31_t pSrcB,
- - - - - + + + + +
*pSrcApoints to the first input vector
*pSrcBpoints to the second input vector
numSamplesnumber of complex samples in each vector
*realResultreal part of the result returned here
*imagResultimaginary part of the result returned here
[in]pSrcApoints to the first input vector
[in]pSrcBpoints to the second input vector
[in]numSamplesnumber of samples in each vector
[out]realResultreal part of the result returned here
[out]imagResultimaginary part of the result returned here
-
Returns
none.
-

Scaling and Overflow Behavior:

-
The function is implemented using an internal 64-bit accumulator. The intermediate 1.31 by 1.31 multiplications are performed with 64-bit precision and then shifted to 16.48 format. The internal real and imaginary accumulators are in 16.48 format and provide 15 guard bits. Additions are nonsaturating and no overflow will occur as long as numSamples is less than 32768. The return results realResult and imagResult are in 16.48 format. Input down scaling is not required.
+
Returns
none
+
Scaling and Overflow Behavior
The function is implemented using an internal 64-bit accumulator. The intermediate 1.31 by 1.31 multiplications are performed with 64-bit precision and then shifted to 16.48 format. The internal real and imaginary accumulators are in 16.48 format and provide 15 guard bits. Additions are nonsaturating and no overflow will occur as long as numSamples is less than 32768. The return results realResult and imagResult are in 16.48 format. Input down scaling is not required.
@@ -313,7 +311,7 @@ for(n=0; n<numSamples; n++) {