Returns a complex vector constructed from the real and imaginary parts of two real vectors.
IppStatus ippsRealToCplx_16s(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp16sc* pDst, int len);
IppStatus ippsRealToCplx_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32fc* pDst, int len);
IppStatus ippsRealToCplx_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64fc* pDst, int len);
pSrcRe |
Pointer to the vector with real parts of complex elements. |
pSrcIm |
Pointer to the vector with imaginary parts of complex elements. |
pDst |
Pointer to the destination vector. |
len |
Number of elements in the vector. |
The function ippsRealToCplx is declared in the ipps.h file. This function returns a complex vector pDst constructed from the real and imaginary parts of the input vectors pSrcRe and pSrcIm.
If pSrcRe is NULL, the real component of the vector is set to zero.
If pSrcIm is NULL, the imaginary component of the vector is set to zero.
Note that the pointers can not be both NULL.
The example below shows how to call the function ippsRealToCplx_32f.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when the pDst pointer is NULLNULL. The pointer pSrcRe or pSrcIm can be NULL. |
ippStsSizeErr |
Indicates an error when len is less than or equal to 0. |
void func_realtocplx()
{
Ipp32f pSrcRe[6] = {12.2, -2.1, 4.3, 1.1, 2.2, 0.0};
Ipp32f pSrcIm[6] = {-9.3, 2.3, -5.2, 0.0, -1.0, -1.2};
Ipp32fc pDst[6];
ippsRealToCplx_32f(pSrcRe, pSrcIm, pDst, 6);
}
Result
pDst ->{(12.2, -9.3), (-2.1, 2.3), (4.3, -5.2), (1.1, 0.0), (2.2, -1.0), (0.0, 10.0}
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.