Developer Reference for Intel® Integrated Performance Primitives 2019

CartToPolar

Converts the elements of a complex vector to polar coordinate form.

Syntax

IppStatus ippsCartToPolar_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDstMagn, Ipp32f* pDstPhase, int len);

IppStatus ippsCartToPolar_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f* pDstMagn, Ipp64f* pDstPhase, int len);

IppStatus ippsCartToPolar_32fc(const Ipp32fc* pSrc, Ipp32f* pDstMagn, Ipp32f* pDstPhase, int len);

IppStatus ippsCartToPolar_64fc(const Ipp64fc* pSrc, Ipp64f* pDstMagn, Ipp64f* pDstPhase, int len);

IppStatus ippsCartToPolar_16sc_Sfs(const Ipp16sc* pSrc, Ipp16s* pDstMagn, Ipp16s* pDstPhase, int len, int magnScaleFactor, int phaseScaleFactor);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pSrc

Pointer to the source vector.

pSrcRe

Pointer to the source vector which stores the real components of Cartesian X,Y pairs.

pSrcIm

Pointer to the source vector which stores the imaginary components of Cartesian X,Y pairs.

pDstMagn

Pointer to the vector which stores the magnitude (radius) component of the elements of the vector pSrc.

pDstPhase

Pointer to the vector which stores the phase (angle) component of the elements of the vector pSrc in radians. Phase values are in the range (-π, π].

len

Number of elements in the vector.

magnScaleFactor

Integer scale factor for the magnitude component, refer to Integer Scaling.

phaseScaleFactor

Integer scale factor for the phase component, refer to Integer Scaling.

Description

This function converts the elements of a complex input vector pSrcor the complex input vector whose real and imaginary components are specified in the vectors pSrcRe and pSrcIm, respectively, to polar coordinate form, and stores the magnitude (radius) component of each element in the vector pDstMagn and the phase (angle) component of each element in the vector pDstPhase.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the specified pointers is NULL.

ippStsSizeErr

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

Example

CartToPolar.c