TOpenCLMatrix::RealToCplx Method

Overload List

#SignatureDescription
1TOpenCLBase *RealToCplx(TOpenCLBase *ReVec, TOpenCLBase *ImVec, int ReIndex, int ImIndex, int Index, int Len);
2TOpenCLMtxVec *RealToCplx(TOpenCLMtxVec *ReVec, TOpenCLMtxVec *ImVec);Constructs a complex object from two real objects.
3TOpenCLMtxVec *RealToCplx(TOpenCLMtxVec *ReVec, TOpenCLMtxVec *ImVec, int ReIndex, int ImIndex, int Index, int Len);Construct a complex object from the ReVec elements [ReIndex]..[ReIndex+Len-1] (real part) and the ImVec elements [ImIndex]..[ImIndex+Len-1] (imaginary part).

Overload 1: TOpenCLBase *RealToCplx(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: TOpenCLMtxVec *RealToCplx(TOpenCLMtxVec *ReVec, TOpenCLMtxVec *ImVec);

Constructs a complex object from two real objects.

#NameTypeDescription
1ReVecTOpenCLMtxVec *
2ImVecTOpenCLMtxVec *
Remarks:

Construct a complex object from the ReVec (real part) and the ImVec (imaginary part) objects. The results are stored in the calling object. Size and TOpenCLBase::Complex properties of the calling object are set implicitly to match ReVec and ImVec objects. An exception is raised if ReVec or ImVec TOpenCLBase::Complex property is True.

Examples
#include "clMtxVec.h"
#include "Units.clMtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::ClMtxVec;

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

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

Construct a complex object from the ReVec elements [ReIndex]..[ReIndex+Len-1] (real part) and the ImVec elements [ImIndex]..[ImIndex+Len-1] (imaginary part).

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

The results are stored to calling object elements [Index]..[Index+Len-1]. Size and TOpenCLBase::Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun. An exception is also raised if ReVec or ImVec TOpenCLBase::Complex property is True.

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