Skip to content

Complex Dot Product

Module: Complex Math Functions

More...

Functions

Name
void plp_cmplx_dot_prod_f32_xpulpv2(const float32_t * pSrcA, const float32_t * pSrcB, uint32_t numSamples, float32_t * realResult, float32_t * imagResult)
Floating-point complex dot product.
void plp_cmplx_dot_prod_i16_rv32im(const int16_t * pSrcA, const int16_t * pSrcB, uint32_t numSamples, int16_t * realResult, int16_t * imagResult)
16-bit integer complex dot product.
void plp_cmplx_dot_prod_i16_xpulpv2(const int16_t * pSrcA, const int16_t * pSrcB, uint32_t numSamples, int16_t * realResult, int16_t * imagResult)
16-bit integer complex dot product.
void plp_cmplx_dot_prod_i32_rv32im(const int32_t * pSrcA, const int32_t * pSrcB, uint32_t numSamples, int32_t * realResult, int32_t * imagResult)
32-bit integer complex dot product.
void plp_cmplx_dot_prod_i32_xpulpv2(const int32_t * pSrcA, const int32_t * pSrcB, uint32_t numSamples, int32_t * realResult, int32_t * imagResult)
32-bit integer complex dot product.
void plp_cmplx_dot_prod_i8_rv32im(const int8_t * pSrcA, const int8_t * pSrcB, uint32_t numSamples, int8_t * realResult, int8_t * imagResult)
8-bit integer complex dot product.
void plp_cmplx_dot_prod_i8_xpulpv2(const int8_t * pSrcA, const int8_t * pSrcB, uint32_t numSamples, int8_t * realResult, int8_t * imagResult)
8-bit integer complex dot product.
void plp_cmplx_dot_prod_q16_rv32im(const int16_t * pSrcA, const int16_t * pSrcB, uint32_t numSamples, uint32_t deciPoint, int16_t * realResult, int16_t * imagResult)
16-bit integer complex dot product.
void plp_cmplx_dot_prod_q16_xpulpv2(const int16_t * pSrcA, const int16_t * pSrcB, uint32_t numSamples, uint32_t deciPoint, int16_t * realResult, int16_t * imagResult)
16-bit integer complex dot product.
void plp_cmplx_dot_prod_q32_rv32im(const int32_t * pSrcA, const int32_t * pSrcB, uint32_t numSamples, uint32_t deciPoint, int32_t * realResult, int32_t * imagResult)
32-bit integer complex dot product.
void plp_cmplx_dot_prod_q32_xpulpv2(const int32_t * pSrcA, const int32_t * pSrcB, uint32_t numSamples, uint32_t deciPoint, int32_t * realResult, int32_t * imagResult)
32-bit integer complex dot product.
void plp_cmplx_dot_prod_f32(const float32_t restrict pSrcA, const float32_t restrict pSrcB, uint32_t numSamples, float32_t restrict realResult, float32_t restrict imagResult)
Glue code for complex dot product of 32-bit float vectors.
void plp_cmplx_dot_prod_i16(const int16_t restrict pSrcA, const int16_t restrict pSrcB, uint32_t numSamples, int16_t restrict realResult, int16_t restrict imagResult)
Glue code for complex dot product of 32-bit float vectors.
void plp_cmplx_dot_prod_i32(const int32_t restrict pSrcA, const int32_t restrict pSrcB, uint32_t numSamples, int32_t restrict realResult, int32_t restrict imagResult)
Glue code for complex dot product of 32-bit float vectors.
void plp_cmplx_dot_prod_i8(const int8_t restrict pSrcA, const int8_t restrict pSrcB, uint32_t numSamples, int8_t restrict realResult, int8_t restrict imagResult)
Glue code for complex dot product of 32-bit float vectors.
void plp_cmplx_dot_prod_q16(const int16_t restrict pSrcA, const int16_t restrict pSrcB, uint32_t numSamples, uint32_t deciPoint, int16_t restrict realResult, int16_t restrict imagResult)
Glue code for complex dot product of 32-bit float vectors.
void plp_cmplx_dot_prod_q32(const int32_t restrict pSrcA, const int32_t restrict pSrcB, uint32_t numSamples, uint32_t deciPoint, int32_t restrict realResult, int32_t restrict imagResult)
Glue code for complex dot product of 32-bit float vectors.

Detailed 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: realResult = 0; imagResult = 0; for (n = 0; n < numSamples; n++) { realResult += pSrcA[(2n)+0] * pSrcB[(2n)+0] - pSrcA[(2n)+1] * pSrcB[(2n)+1]; imagResult += pSrcA[(2n)+0] * pSrcB[(2n)+1] + pSrcA[(2n)+1] * pSrcB[(2n)+0]; } There are separate functions for floating point, integer, and fixed point 32- 16- 8-bit data types.

Functions Documentation

function plp_cmplx_dot_prod_f32_xpulpv2

void plp_cmplx_dot_prod_f32_xpulpv2(
    const float32_t * pSrcA,
    const float32_t * pSrcB,
    uint32_t numSamples,
    float32_t * realResult,
    float32_t * imagResult
)

Floating-point complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i16_rv32im

void plp_cmplx_dot_prod_i16_rv32im(
    const int16_t * pSrcA,
    const int16_t * pSrcB,
    uint32_t numSamples,
    int16_t * realResult,
    int16_t * imagResult
)

16-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i16_xpulpv2

void plp_cmplx_dot_prod_i16_xpulpv2(
    const int16_t * pSrcA,
    const int16_t * pSrcB,
    uint32_t numSamples,
    int16_t * realResult,
    int16_t * imagResult
)

16-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i32_rv32im

void plp_cmplx_dot_prod_i32_rv32im(
    const int32_t * pSrcA,
    const int32_t * pSrcB,
    uint32_t numSamples,
    int32_t * realResult,
    int32_t * imagResult
)

32-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i32_xpulpv2

void plp_cmplx_dot_prod_i32_xpulpv2(
    const int32_t * pSrcA,
    const int32_t * pSrcB,
    uint32_t numSamples,
    int32_t * realResult,
    int32_t * imagResult
)

32-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i8_rv32im

void plp_cmplx_dot_prod_i8_rv32im(
    const int8_t * pSrcA,
    const int8_t * pSrcB,
    uint32_t numSamples,
    int8_t * realResult,
    int8_t * imagResult
)

8-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i8_xpulpv2

void plp_cmplx_dot_prod_i8_xpulpv2(
    const int8_t * pSrcA,
    const int8_t * pSrcB,
    uint32_t numSamples,
    int8_t * realResult,
    int8_t * imagResult
)

8-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_q16_rv32im

void plp_cmplx_dot_prod_q16_rv32im(
    const int16_t * pSrcA,
    const int16_t * pSrcB,
    uint32_t numSamples,
    uint32_t deciPoint,
    int16_t * realResult,
    int16_t * imagResult
)

16-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • deciPoint decimal point for right shift
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

16-bit fixed-point complex dot product.

function plp_cmplx_dot_prod_q16_xpulpv2

void plp_cmplx_dot_prod_q16_xpulpv2(
    const int16_t * pSrcA,
    const int16_t * pSrcB,
    uint32_t numSamples,
    uint32_t deciPoint,
    int16_t * realResult,
    int16_t * imagResult
)

16-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • deciPoint decimal point for right shift
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

16-bit fixed-point complex dot product.

function plp_cmplx_dot_prod_q32_rv32im

void plp_cmplx_dot_prod_q32_rv32im(
    const int32_t * pSrcA,
    const int32_t * pSrcB,
    uint32_t numSamples,
    uint32_t deciPoint,
    int32_t * realResult,
    int32_t * imagResult
)

32-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • deciPoint decimal point for right shift
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_q32_xpulpv2

void plp_cmplx_dot_prod_q32_xpulpv2(
    const int32_t * pSrcA,
    const int32_t * pSrcB,
    uint32_t numSamples,
    uint32_t deciPoint,
    int32_t * realResult,
    int32_t * imagResult
)

32-bit integer complex dot product.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • deciPoint decimal point for right shift
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

32-bit fixed-point complex dot product.

function plp_cmplx_dot_prod_f32

void plp_cmplx_dot_prod_f32(
    const float32_t *__restrict__ pSrcA,
    const float32_t *__restrict__ pSrcB,
    uint32_t numSamples,
    float32_t *__restrict__ realResult,
    float32_t *__restrict__ imagResult
)

Glue code for complex dot product of 32-bit float vectors.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i16

void plp_cmplx_dot_prod_i16(
    const int16_t *__restrict__ pSrcA,
    const int16_t *__restrict__ pSrcB,
    uint32_t numSamples,
    int16_t *__restrict__ realResult,
    int16_t *__restrict__ imagResult
)

Glue code for complex dot product of 32-bit float vectors.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i32

void plp_cmplx_dot_prod_i32(
    const int32_t *__restrict__ pSrcA,
    const int32_t *__restrict__ pSrcB,
    uint32_t numSamples,
    int32_t *__restrict__ realResult,
    int32_t *__restrict__ imagResult
)

Glue code for complex dot product of 32-bit float vectors.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_i8

void plp_cmplx_dot_prod_i8(
    const int8_t *__restrict__ pSrcA,
    const int8_t *__restrict__ pSrcB,
    uint32_t numSamples,
    int8_t *__restrict__ realResult,
    int8_t *__restrict__ imagResult
)

Glue code for complex dot product of 32-bit float vectors.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_q16

void plp_cmplx_dot_prod_q16(
    const int16_t *__restrict__ pSrcA,
    const int16_t *__restrict__ pSrcB,
    uint32_t numSamples,
    uint32_t deciPoint,
    int16_t *__restrict__ realResult,
    int16_t *__restrict__ imagResult
)

Glue code for complex dot product of 32-bit float vectors.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • deciPoint decimal point for right shift
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none

function plp_cmplx_dot_prod_q32

void plp_cmplx_dot_prod_q32(
    const int32_t *__restrict__ pSrcA,
    const int32_t *__restrict__ pSrcB,
    uint32_t numSamples,
    uint32_t deciPoint,
    int32_t *__restrict__ realResult,
    int32_t *__restrict__ imagResult
)

Glue code for complex dot product of 32-bit float vectors.

Parameters:

  • pSrcA points to the first input vector
  • pSrcB points to the second input vector
  • numSamples number of samples in each vector
  • deciPoint decimal point for right shift
  • realResult real part of the result returned here
  • imagResult imaginary part of the result returned here

Return: none


Updated on 2023-03-01 at 16:16:32 +0000