LIBML  Version 3.2.4
LIBML DSP Software Library
Functions
Complex-by-Real Multiplication
Collaboration diagram for Complex-by-Real Multiplication:

Functions

void tpt_cmplx_mult_real_f32 (f32_t *__restrict aOutData, const f32_t *__restrict aInData, const f32_t *__restrict aInReal, uint32_t aCount)
 Floating-point complex-by-real multiplication. More...
 
void tpt_cmplx_mult_real_q15 (q15_t *__restrict aOutData, const q15_t *__restrict aInData, const q15_t *__restrict aInReal, uint32_t aCount)
 Floating-point complex-by-real multiplication. More...
 
void tpt_cmplx_mult_real_q31 (q31_t *__restrict aOutData, const q31_t *__restrict aInData, const q31_t *__restrict aInReal, uint32_t aCount)
 Floating-point complex-by-real multiplication. More...
 

Detailed Description

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 aCount represents the number of complex samples processed. The complex arrays have a total of 2*aCount real values while the real array has a total of aCount real values.

The underlying algorithm is used:

    for (n = 0; n < aCount; n++)
    {
      aOutData[2 * n + 0] = aInData[2 * n + 0] * aInReal[n];
      aOutData[2 * n + 1] = aInData[2 * n + 1] * aInReal[n];
    }
  

There are separate functions for floating-point, Q15, and Q31 data types.

Function Documentation

◆ tpt_cmplx_mult_real_f32()

void tpt_cmplx_mult_real_f32 ( f32_t *__restrict  aOutData,
const f32_t *__restrict  aInData,
const f32_t *__restrict  aInReal,
uint32_t  aCount 
)

Floating-point complex-by-real multiplication.

Parameters
[out]aOutDatapoints to complex output vector.
[in]aInDatapoints to complex input vector.
[in]aInRealpoints to real input vector.
[in]aCountnumber of samples in each vector
Returns
none

◆ tpt_cmplx_mult_real_q15()

void tpt_cmplx_mult_real_q15 ( q15_t *__restrict  aOutData,
const q15_t *__restrict  aInData,
const q15_t *__restrict  aInReal,
uint32_t  aCount 
)

Floating-point complex-by-real multiplication.

Parameters
[out]aOutDatapoints to complex output vector.
[in]aInDatapoints to complex input vector.
[in]aInRealpoints to real input vector.
[in]aCountnumber of samples in each vector
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] are saturated.

◆ tpt_cmplx_mult_real_q31()

void tpt_cmplx_mult_real_q31 ( q31_t *__restrict  aOutData,
const q31_t *__restrict  aInData,
const q31_t *__restrict  aInReal,
uint32_t  aCount 
)

Floating-point complex-by-real multiplication.

Parameters
[out]aOutDatapoints to complex output vector.
[in]aInDatapoints to complex input vector.
[in]aInRealpoints to real input vector.
[in]aCountnumber of samples in each vector
Returns
none
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q31 range[0x80000000 0x7FFFFFFF] are saturated.