LIBML
Version 3.2.4
LIBML DSP Software Library
|
Functions | |
void | tpt_cmplx_dot_prod_f32 (f32_t *__restrict aRealResult, f32_t *__restrict aImagResult, const f32_t *__restrict aInDataA, const f32_t *__restrict aInDataB, uint32_t aCount) |
Floating-point complex dot product. More... | |
void | tpt_cmplx_dot_prod_q15 (q33_30_t *__restrict aRealResult, q33_30_t *__restrict aImagResult, const q15_t *__restrict aInDataA, const q15_t *__restrict aInDataB, uint32_t aCount) |
Q15 complex dot product. More... | |
void | tpt_cmplx_dot_prod_q31 (q15_48_t *__restrict aRealResult, q15_48_t *__restrict aImagResult, const q31_t *__restrict aInDataA, const q31_t *__restrict aInDataB, uint32_t aCount) |
Q31 complex dot product. More... | |
Computes the dot product of two complex vectors. The vectors are multiplied element-by-element and then summed.
The aInDataA
points to the first complex input vector and aInDataB
points to the second complex input vector. aCount
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 * aCount
values.
The underlying algorithm is used:
aRealResult = 0; aImagResult = 0; for (n = 0; n < aCount; n++) { aRealResult += aInDataA[2 * n + 0] * aInDataB[2 * n + 0]
There are separate functions for floating-point, Q15, and Q31 data types.
void tpt_cmplx_dot_prod_f32 | ( | f32_t *__restrict | aRealResult, |
f32_t *__restrict | aImagResult, | ||
const f32_t *__restrict | aInDataA, | ||
const f32_t *__restrict | aInDataB, | ||
uint32_t | aCount | ||
) |
Floating-point complex dot product.
[out] | aRealResult | real part of the result returned here |
[out] | aImagResult | imaginary part of the result returned here |
[in] | aInDataA | points to the first input vector. |
[in] | aInDataB | points to the second input vector. |
[in] | aCount | number of samples in each vector |
void tpt_cmplx_dot_prod_q15 | ( | q33_30_t *__restrict | aRealResult, |
q33_30_t *__restrict | aImagResult, | ||
const q15_t *__restrict | aInDataA, | ||
const q15_t *__restrict | aInDataB, | ||
uint32_t | aCount | ||
) |
Q15 complex dot product.
[out] | aRealResult | real part of the result returned here |
[out] | aImagResult | imaginary part of the result returned here |
[in] | aInDataA | points to the first input vector. |
[in] | aInDataB | points to the second input vector. |
[in] | aCount | number of samples in each vector |
aRealResult
and aImagResult
are in Q24 format. void tpt_cmplx_dot_prod_q31 | ( | q15_48_t *__restrict | aRealResult, |
q15_48_t *__restrict | aImagResult, | ||
const q31_t *__restrict | aInDataA, | ||
const q31_t *__restrict | aInDataB, | ||
uint32_t | aCount | ||
) |
Q31 complex dot product.
[out] | aRealResult | real part of the result returned here |
[out] | aImagResult | imaginary part of the result returned here |
[in] | aInDataA | points to the first input vector. |
[in] | aInDataB | points to the second input vector. |
[in] | aCount | number of samples in each vector |
aCount
is less than 32768. The return results aRealResult
and aImagResult
are in 16.48 format. Input down scaling is not required.