void CplxToReal(TOpenCLValue *ReVec, TOpenCLValue *ImVec) const;
Split complex value in real and imaginary part.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ReVec | TOpenCLValue * | |
| 2 | ImVec | TOpenCLValue * |
Remarks:
Split calling objects value into real and imaginary components. Store the real component in ReVec and imaginary component in ImVec. FloatPrecision and clValue::Complex properties of ReVec and ImVec are set implicitly to match with the calling value object. An execption is raised, if the calling object is not complex.
Examples
#include "Units.Math387.h"
#include "clMtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::Math387;
void Example()
{
clValue a, b, c;
a.Copy(Cplx(3, 4)); // a = 3+4i
a.CplxToReal(b, c); // b = 3, c = 4
}
See Also: clValue::RealToCplx
Declared in Dew::Math::clValue · Dew.Math/clMtxExpr.h · Cross-compiler