Developer Reference for Intel® Integrated Performance Primitives 2018
Computes the magnitudes of the elements of a complex vector.
IppStatus ippsMagnitude_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst, int len);
IppStatus ippsMagnitude_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f* pDst, int len);
IppStatus ippsMagnitude_32fc(const Ipp32fc* pSrc, Ipp32f* pDst, int len);
IppStatus ippsMagnitude_64fc(const Ipp64fc* pSrc, Ipp64f* pDst, int len);
IppStatus ippsMagnitude_16s32f(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp32f* pDst, int len);
IppStatus ippsMagnitude_16sc32f(const Ipp16sc* pSrc, Ipp32f* pDst, int len);
IppStatus ippsMagnitude_16s_Sfs(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp16s* pDst, int len, int scaleFactor);
IppStatus ippsMagnitude_16sc_Sfs(const Ipp16sc* pSrc, Ipp16s* pDst, int len, int scaleFactor);
IppStatus ippsMagnitude_32sc_Sfs(const Ipp32sc* pSrc, Ipp32s* pDst, int len, int scaleFactor);
ipps.h
Headers: ippcore.h, ippvm.h
Libraries: ippcore.lib, ippvm.lib
pSrc |
Pointer to the source vector. |
pSrcRe |
Pointer to the vector with the real parts of complex elements. |
pSrcIm |
Pointer to the vector with the imaginary parts of complex elements. |
pDst |
Pointer to the destination vector. |
len |
Number of elements in the vector |
scaleFactor |
Scale factor, refer to Integer Scaling. |
The complex flavor of this function computes the element-wise magnitude of the complex vector pSrc and stores the result in pDst. The element-wise magnitude is defined by the formula:
magn[n] = (pSrc[n].re2 + pSrc[n].im2)1/2
The real flavor of the function ippsMagnitude computes the element-wise magnitude of the complex vector whose real and imaginary components are specified in the vectors pSrcRe and pSrcIm, respectively, and stores the result in pDst. The element-wise magnitude is defined by the formula:
magn[n] = (pSrcRe[n]2 + pSrcIm[n]2)1/2
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. |