HPM SDK
HPMicro Software Development Kit
DSP Complex Functions

Functions

static void hpm_dsp_cconj_f32 (const float32_t *src, float32_t *dst, uint32_t size)
 Conjugate the floating-potint complex vector. More...
 
static void hpm_dsp_cconj_q15 (const q15_t *src, q15_t *dst, uint32_t size)
 Conjugate the q15 complex vector. More...
 
static void hpm_dsp_cconj_q31 (const q31_t *src, q31_t *dst, uint32_t size)
 Conjugate the q31 complex vector. More...
 
static void hpm_dsp_cdprod_f32 (const float32_t *src1, const float32_t *src2, uint32_t size, float32_t *dst)
 Compute the dot product of the floating-potint complex vector. More...
 
static void hpm_dsp_cdprod_typ2_f32 (const float32_t *src1, const float32_t *src2, uint32_t size, float32_t *rout, float32_t *iout)
 Compute the dot product type2 of the floating-potint complex vector. More...
 
static void hpm_dsp_cdprod_q15 (const q15_t *src1, const q15_t *src2, uint32_t size, q15_t *dst)
 Compute the dot product of the q15 complex vector. More...
 
static void hpm_dsp_cdprod_typ2_q15 (const q15_t *src1, const q15_t *src2, uint32_t size, q31_t *rout, q31_t *iout)
 Compute the dot product type2 of the q15 complex vector. More...
 
static void hpm_dsp_cdprod_q31 (const q31_t *src1, const q31_t *src2, uint32_t size, q31_t *dst)
 Compute the dot product of the q31 complex vector. More...
 
static void hpm_dsp_cdprod_typ2_q31 (const q31_t *src1, const q31_t *src2, uint32_t size, q63_t *rout, q63_t *iout)
 Compute the dot product type2 of the q31 complex vector. More...
 
static void hpm_dsp_cmag_f32 (const float32_t *src, float32_t *dst, uint32_t size)
 Compute the magnitude of the floating-potint complex vector. More...
 
static void hpm_dsp_cmag_q15 (const q15_t *src, q15_t *dst, uint32_t size)
 Compute the magnitude of the q15 complex vector. More...
 
static void hpm_dsp_cmag_q31 (const q31_t *src, q31_t *dst, uint32_t size)
 Compute the magnitude of the q31 complex vector. More...
 
static void hpm_dsp_cmag_sqr_f32 (const float32_t *src, float32_t *dst, uint32_t size)
 Compute the magnitude squared of the floating-potint complex vector. More...
 
static void hpm_dsp_cmag_sqr_q15 (const q15_t *src, q15_t *dst, uint32_t size)
 Compute the magnitude squared of the q15 complex vector. More...
 
static void hpm_dsp_cmag_sqr_q31 (const q31_t *src, q31_t *dst, uint32_t size)
 Compute the magnitude squared of the q31 complex vector. More...
 
static void hpm_dsp_cmul_f32 (const float32_t *src1, const float32_t *src2, float32_t *dst, uint32_t size)
 Multiply two folating-point complex vector. More...
 
static void hpm_dsp_cmul_q15 (const q15_t *src1, const q15_t *src2, q15_t *dst, uint32_t size)
 Multiply two q15 complex vector. More...
 
static void hpm_dsp_cmul_q31 (const q31_t *src1, const q31_t *src2, q31_t *dst, uint32_t size)
 Multiply two q31 complex vector. More...
 
static void hpm_dsp_cmul_real_f32 (const float32_t *src, const float32_t *real, float32_t *dst, uint32_t size)
 Multiply the folating-point complex vector by a real vector. More...
 
static void hpm_dsp_cmul_real_q15 (const q15_t *src, const q15_t *real, q15_t *dst, uint32_t size)
 Multiply the q15 complex vector by a real vector. More...
 
static void hpm_dsp_cmul_real_q31 (const q31_t *src, const q31_t *real, q31_t *dst, uint32_t size)
 Multiply the q31 complex vector by a real vector. More...
 

Detailed Description

This set of functions operates on complex data vectors. The data in the input src vector and output dst are arranged in the array as: [real, imag, real, imag, real, imag, ...).

Function Documentation

◆ hpm_dsp_cconj_f32()

static void hpm_dsp_cconj_f32 ( const float32_t *  src,
float32_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Conjugate the floating-potint complex vector.

Parameters
[in]*srcthe input complex vector.
[out]*dstthe output complex vector.
[in]sizesize of the vectors.

◆ hpm_dsp_cconj_q15()

static void hpm_dsp_cconj_q15 ( const q15_t *  src,
q15_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Conjugate the q15 complex vector.

Parameters
[in]*srcthe input complex vector.
[out]*dstthe output complex vector.
[in]sizesize of the vectors.

The Q15 value INT16_MIN (0x8000) will be saturated to the maximum allowable positive value INT16_MAX.

◆ hpm_dsp_cconj_q31()

static void hpm_dsp_cconj_q31 ( const q31_t *  src,
q31_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Conjugate the q31 complex vector.

Parameters
[in]*srcthe input complex vector.
[out]*dstthe output complex vector.
[in]sizesize of the vectors.

The Q31 value INT32_MIN (0x80000000) will be saturated to the maximum allowable positive value INT32_MAX.

◆ hpm_dsp_cdprod_f32()

static void hpm_dsp_cdprod_f32 ( const float32_t *  src1,
const float32_t *  src2,
uint32_t  size,
float32_t *  dst 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the dot product of the floating-potint complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[in]sizesize of the vectors.
[out]*dstthe output vector.

◆ hpm_dsp_cdprod_q15()

static void hpm_dsp_cdprod_q15 ( const q15_t *  src1,
const q15_t *  src2,
uint32_t  size,
q15_t *  dst 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the dot product of the q15 complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[in]sizesize of the vectors.
[out]*dstthe output vector.

The multiplication outputs are in 1.15 x 1.15 = 2.30 format and finally output is shift into 3.13 format.

◆ hpm_dsp_cdprod_q31()

static void hpm_dsp_cdprod_q31 ( const q31_t *  src1,
const q31_t *  src2,
uint32_t  size,
q31_t *  dst 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the dot product of the q31 complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[in]sizesize of the vectors.
[out]*dstthe output vector.

The multiplication outputs are in 1.31 x 1.31 = 2.62 format and finally output is shift into 3.29 format.

◆ hpm_dsp_cdprod_typ2_f32()

static void hpm_dsp_cdprod_typ2_f32 ( const float32_t *  src1,
const float32_t *  src2,
uint32_t  size,
float32_t *  rout,
float32_t *  iout 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the dot product type2 of the floating-potint complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[in]sizesize of the vectors.
[out]*routthe real sum of the output.
[out]*ioutthe imag sum of the output.

◆ hpm_dsp_cdprod_typ2_q15()

static void hpm_dsp_cdprod_typ2_q15 ( const q15_t *  src1,
const q15_t *  src2,
uint32_t  size,
q31_t *  rout,
q31_t *  iout 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the dot product type2 of the q15 complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[in]sizesize of the vectors.
[out]*routthe real sum of the output.
[out]*ioutthe imag sum of the output.

The multiplication outputs are in 1.15 x 1.15 = 2.30 format and finally output is shift into q24 format.

◆ hpm_dsp_cdprod_typ2_q31()

static void hpm_dsp_cdprod_typ2_q31 ( const q31_t *  src1,
const q31_t *  src2,
uint32_t  size,
q63_t *  rout,
q63_t *  iout 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the dot product type2 of the q31 complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[in]sizesize of the vectors.
[out]*routthe real sum of the output.
[out]*ioutthe imag sum of the output.

The multiplication outputs are in 1.31 x 1.31 = 2.62 format and finally output is shift into q48 format.

◆ hpm_dsp_cmag_f32()

static void hpm_dsp_cmag_f32 ( const float32_t *  src,
float32_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the magnitude of the floating-potint complex vector.

Parameters
[in]*srcpoints to the input complex vector.
[out]*dstpoints to the output complex vector.
[in]sizesize of the vectors.

◆ hpm_dsp_cmag_q15()

static void hpm_dsp_cmag_q15 ( const q15_t *  src,
q15_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the magnitude of the q15 complex vector.

Parameters
[in]*srcpoints to the input complex vector.
[out]*dstpoints to the output complex vector.
[in]sizesize of the vectors.

The multiplication outputs are in 1.15 x 1.15 = 2.30 format and finally output is shift into 2.14 format.

◆ hpm_dsp_cmag_q31()

static void hpm_dsp_cmag_q31 ( const q31_t *  src,
q31_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the magnitude of the q31 complex vector.

Parameters
[in]*srcpoints to the input complex vector.
[out]*dstpoints to the output complex vector.
[in]sizesize of the vectors.

The multiplication outputs are in 1.31 x 1.31 = 2.62 format and finally output is shift into 2.30 format.

◆ hpm_dsp_cmag_sqr_f32()

static void hpm_dsp_cmag_sqr_f32 ( const float32_t *  src,
float32_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the magnitude squared of the floating-potint complex vector.

Parameters
[in]*srcpoints to the input complex vector.
[out]*dstpoints to the output complex vector.
[in]sizesize of the vectors.

◆ hpm_dsp_cmag_sqr_q15()

static void hpm_dsp_cmag_sqr_q15 ( const q15_t *  src,
q15_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the magnitude squared of the q15 complex vector.

Parameters
[in]*srcpoints to the input complex vector.
[out]*dstpoints to the output complex vector.
[in]sizesize of the vectors.

The multiplication outputs are in 1.15 x 1.15 = 2.30 format and finally output is shift into 3.13 format.

◆ hpm_dsp_cmag_sqr_q31()

static void hpm_dsp_cmag_sqr_q31 ( const q31_t *  src,
q31_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Compute the magnitude squared of the q31 complex vector.

Parameters
[in]*srcpoints to the input complex vector.
[out]*dstpoints to the output complex vector.
[in]sizesize of the vectors.

The multiplication outputs are in 1.31 x 1.31 = 2.62 format and finally output is shift into 3.29 format.

◆ hpm_dsp_cmul_f32()

static void hpm_dsp_cmul_f32 ( const float32_t *  src1,
const float32_t *  src2,
float32_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Multiply two folating-point complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[out]*dstoutput complex vector.
[in]sizesize of the vectors.

◆ hpm_dsp_cmul_q15()

static void hpm_dsp_cmul_q15 ( const q15_t *  src1,
const q15_t *  src2,
q15_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Multiply two q15 complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[out]*dstoutput complex vector.
[in]sizesize of the vectors.

The multiplication outputs are in 1.15 x 1.15 = 2.30 format and finally output is shift into 3.13 format.

◆ hpm_dsp_cmul_q31()

static void hpm_dsp_cmul_q31 ( const q31_t *  src1,
const q31_t *  src2,
q31_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Multiply two q31 complex vector.

Parameters
[in]*src1the first input complex vector.
[in]*src2the second input complex vector.
[out]*dstoutput complex vector.
[in]sizesize of the vectors.

The multiplication outputs are in 1.31 x 1.31 = 2.62 format and finally output is shift into 3.29 format.

◆ hpm_dsp_cmul_real_f32()

static void hpm_dsp_cmul_real_f32 ( const float32_t *  src,
const float32_t *  real,
float32_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Multiply the folating-point complex vector by a real vector.

Parameters
[in]*srcthe input complex vector.
[in]*realthe input real vector.
[out]*dstoutput complex vector.
[in]sizesize of the vectors.

◆ hpm_dsp_cmul_real_q15()

static void hpm_dsp_cmul_real_q15 ( const q15_t *  src,
const q15_t *  real,
q15_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Multiply the q15 complex vector by a real vector.

Parameters
[in]*srcthe input complex vector.
[in]*realthe input real vector.
[out]*dstoutput complex vector.
[in]sizesize of the vectors.

Output results will be saturated in Q15 range [0x8000 0x7FFF].

◆ hpm_dsp_cmul_real_q31()

static void hpm_dsp_cmul_real_q31 ( const q31_t *  src,
const q31_t *  real,
q31_t *  dst,
uint32_t  size 
)
inlinestatic

#include <middleware/hpm_math/hpm_math.h>

Multiply the q31 complex vector by a real vector.

Parameters
[in]*srcthe input complex vector.
[in]*realthe input real vector.
[out]*dstoutput complex vector.
[in]sizesize of the vectors.

Output results will be saturated in Q31 range[0x80000000 0x7FFFFFFF].