clValue::RealToCplx Method

TOpenCLValue *RealToCplx(TOpenCLValue *ReVec, TOpenCLValue *ImVec) const;

Constructs a complex object from two real objects.

#NameTypeDescription
1ReVecTOpenCLValue *
2ImVecTOpenCLValue *
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 clValue::Complex properties of the calling object are set implicitly to match ReVec and ImVec objects. An exception is raised if ReVec or ImVec clValue::Complex property is True.

Examples
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

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

    a.Copy(3);
    b.Copy(4);
    c.RealToCplx(a, b);  //c =3+4i;
}
See Also: clValue::CplxToReal
Declared in Dew::Math::clValue · Dew.Math/clMtxExpr.h · Cross-compiler