TOpenCLMatrix::CplxToReal Method

Overload List

#SignatureDescription
1void CplxToReal(TOpenCLBase *ReVec, TOpenCLBase *ImVec, int ReIndex, int ImIndex, int Index, int Len);
2void CplxToReal(TOpenCLMtxVec *ReVec, TOpenCLMtxVec *ImVec);Split complex calling object in real and imaginary part.
3void CplxToReal(TOpenCLMtxVec *ReVec, TOpenCLMtxVec *ImVec, int ReIndex, int ImIndex, int Index, int Len);Split calling object elements [Index]..[Index+Len-1] into real and imaginary components.

Overload 1: void CplxToReal(TOpenCLBase *ReVec, TOpenCLBase *ImVec, int ReIndex, int ImIndex, int Index, int Len);

#NameTypeDescription
1ReVecTOpenCLBase *
2ImVecTOpenCLBase *
3ReIndexint
4ImIndexint
5Indexint
6Lenint
Declared in Dew::Math::TOpenCLBase · Dew.Math/clMtxVec.h · Cross-compiler

Overload 2: void CplxToReal(TOpenCLMtxVec *ReVec, TOpenCLMtxVec *ImVec);

Split complex calling object in real and imaginary part.

#NameTypeDescription
1ReVecTOpenCLMtxVec *
2ImVecTOpenCLMtxVec *
Remarks:

Split calling object into real and imaginary components. Store all real components in ReVec and all imaginary components in ImVec. Size and TOpenCLBase::Complex properties of ReVec and ImVec are set implicitly to match with the calling vector. An execption is raised if calling object is not complex.

Examples
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    clVector a, b, c;

    a.CopyCplxFromArray(DewArray<float>{1, -2, 3, 4}); // a= [1-2i, 3+4i]
    a.CplxToReal(b, c); // b = [1, 3], c = [-2, 4]
}
See Also: TOpenCLMatrix::RealToCplx
Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 3: void CplxToReal(TOpenCLMtxVec *ReVec, TOpenCLMtxVec *ImVec, int ReIndex, int ImIndex, int Index, int Len);

Split calling object elements [Index]..[Index+Len-1] into real and imaginary components.

#NameTypeDescription
1ReVecTOpenCLMtxVec *
2ImVecTOpenCLMtxVec *
3ReIndexint
4ImIndexint
5Indexint
6Lenint
Remarks:

Store real components in ReVec elements [ReIndex]..[ReIndex+Len-1] and imaginary components in ImVec elements [ImIndex]..[ImIndex+Len-1]. Size and TOpenCLBase::Complex properties must be set explicitly. An exception is raised if array borders are overrun or underrun.

Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler