LIBML
Version 3.2.4
LIBML DSP Software Library
|
Functions | |
void | tpt_cmplx_mag_squared_f32 (f32_t *__restrict aOutData, const f32_t *__restrict aInData, uint32_t aCount) |
Floating-point complex magnitude squared. More... | |
void | tpt_cmplx_mag_squared_f64 (f64_t *__restrict aOutData, const f64_t *__restrict aInData, uint32_t aCount) |
Floating-point complex magnitude squared. More... | |
void | tpt_cmplx_mag_squared_q15 (q1_14_t *__restrict aOutData, const q15_t *__restrict aInData, uint32_t aCount) |
Q15 complex magnitude squared. More... | |
void | tpt_cmplx_mag_squared_q31 (q1_30_t *__restrict aOutData, const q31_t *__restrict aInData, uint32_t aCount) |
Q31 complex magnitude squared. More... | |
Computes the magnitude squared of the elements of a complex data vector.
The aInData
points to the source data and aOutData
points to the where the result should be written. aCount
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*aCount
values; the output array has a total of aCount
values.
The underlying algorithm is used:
for (n = 0; n < aCount; n++) { aOutData[n] = aInData[2 * n + 0] ^ 2 + aInData[2 * n + 1] ^ 2; }
There are separate functions for floating-point, Q15, and Q31 data types.
void tpt_cmplx_mag_squared_f32 | ( | f32_t *__restrict | aOutData, |
const f32_t *__restrict | aInData, | ||
uint32_t | aCount | ||
) |
Floating-point complex magnitude squared.
[out] | aOutData | points to the output vector. |
[in] | aInData | points to the input vector. |
[in] | aCount | number of samples in each vector |
void tpt_cmplx_mag_squared_f64 | ( | f64_t *__restrict | aOutData, |
const f64_t *__restrict | aInData, | ||
uint32_t | aCount | ||
) |
Floating-point complex magnitude squared.
[out] | aOutData | points to the output vector. |
[in] | aInData | points to the input vector. |
[in] | aCount | number of samples in each vector |
void tpt_cmplx_mag_squared_q15 | ( | q1_14_t *__restrict | aOutData, |
const q15_t *__restrict | aInData, | ||
uint32_t | aCount | ||
) |
Q15 complex magnitude squared.
[out] | aOutData | points to the output vector. |
[in] | aInData | points to the input vector. |
[in] | aCount | number of samples in each vector |
void tpt_cmplx_mag_squared_q31 | ( | q1_30_t *__restrict | aOutData, |
const q31_t *__restrict | aInData, | ||
uint32_t | aCount | ||
) |
Q31 complex magnitude squared.
[out] | aOutData | points to the output vector. |
[in] | aInData | points to the input vector. |
[in] | aCount | number of samples in each vector |