MagSquared

Computes the squared magnitudes of the elements of a complex vector.

Syntax

IppStatus ippsMagSquared_32sc32s_Sfs(const Ipp32sc* pSrc, Ipp32s* pDst, int len, int scaleFactor);

IppStatus ippsMagSquared_32fc64f(const Ipp32fc* pSrc, Ipp64f* pDst, int len);

Parameters

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

Description

The function ippsMagSquared is declared in the ipps.h file. This function computes the element-wise squared magnitude of the complex vector pSrc and stores the result in pDst. The element-wise squared magnitude is defined by the formula:

magn[n] = pSrc[n].re2 + pSrc[n].im2

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.