6.4.13 SquareMagnitudeComplex

Description

SquareMagnitudeCplx computes the squared magnitude of each element in a complex source vector.

Prototype

fractional* SquareMagnitudeCplx (numElems, fractcomplex* srcV, fractional* dstV);

Arguments

Parameters

Description

numElems

Number of complex elements in the source vector

srcV

Pointer to the fractcomplex source vector

dstV

Pointer to the fractional destination vector

Return

Pointer to the base address of the destination sample.

Remarks

If the sum of squares of the real and imaginary parts of a complex element in the source vector is larger than the max value of supported fractional data (1 - 2-31), this operation results in saturation.

This function can be used to operate in-place on a source data set.

Source File

  • cplxsqrmag_aa.s

Function Profile

PIC32A

Program Words

15

Cycle Count

34 + 3.5(numElems)

System resource usage

  • W0…W4 - used, not restored
  • W13 - saved, used, restored
  • ACCA/ACCB - used, not restored
  • REPEAT instruction usage – None