clValue.CplxToReal Method

procedure CplxToReal(ReVec: TOpenCLValue; ImVec: TOpenCLValue);

Split complex value in real and imaginary part.

#NameTypeDescription
1ReVecTOpenCLValuesource TOpenCLValue
2ImVecTOpenCLValuesource TOpenCLValue

Result: stored in self (calling object)

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
var a,b,c: clValue;
begin
    a.Copy(Cplx(3,4));    // a= [1-2i, 3+4i]
    a.CplxToReal(b,c);  // b = 3, c = 4
end;
See Also: clValue.RealToCplx