Real

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

Syntax

IppStatus ippsReal_16sc(const Ipp16sc* pSrc, Ipp16s* pDstRe, int len);

IppStatus ippsReal_32fc(const Ipp32fc* pSrc, Ipp32f* pDstRe, int len);

IppStatus ippsReal_64fc(const Ipp64fc* pSrc, Ipp64f* pDstRe, int len);

Parameters

pSrc

Pointer to the complex source vector.

pDstRe

Pointer to the destination vector with real parts.

len

Number of elements in the vector.

Description

The function ippsReal is declared in the ipps.h file. This function returns the real part of the complex vector pSrc in the vector pDstRe.

The example below shows how to call the function ippsReal_32fc.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

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

Using the Function ippsReal

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

		
    ippsReal_32fc(pSrc,pDstRe,5);
}
Result
pDestRe ->(1.2, 0.0, 4.3, 4.2, 1.2)

Submit feedback on this help topic

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