Imag

Returns the imaginary part of a complex vector in a second vector.

Syntax

IppStatus ippsImag_16sc(const Ipp16sc* pSrc, Ipp16s* pDstIm, int len);

IppStatus ippsImag_32fc(const Ipp32fc* pSrc, Ipp32f* pDstIm, int len);

IppStatus ippsImag_64fc(const Ipp64fc* pSrc, Ipp64f* pDstIm, int len);

Parameters

pSrc

Pointer to the complex source vector.

pDstIm

Pointer to the destination vector with imaginary parts.

len

Number of elements in the vector.

Description

The function ippsImag is declared in the ipps.h file. This function returns the imaginary part of a complex vector pSrc in the vector pDstIm.

The example below shows how to call the function ippsImag_32fc.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDstIm or pSrc pointer is NULL.

ippStsSizeErr

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

Using the Function ippsImag

void func_imag()
{
    Ipp32fc pSrc[5] = {{1.2, 3.2}, {0.0, 0.3}, {4.3, 6.7}, {4.2, 0.0}, {1.2, 1.2}};
    Ipp32f pDstIm[5];

		
    ippsImag_32fc(pSrc, pDstIm, 5);
}
Result
pDstIm ->(3.2, 0.3, 6.7, 0.0, 1.2)

Submit feedback on this help topic

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