TOpenCLValue.RealPart Method

TOpenCLValue RealPart(TOpenCLValue Vec)

Gets real part of the complex value.

#NameTypeDescription
1VecTOpenCLValuesource TOpenCLValue

Returns: TOpenCLValue

Remarks:

The method gets the real part of the complex value stored in Vec and stores the real results in the calling object. FloatPrecision and Dew.Math.TOpenCLBase.Complex properties of the calling object are set implicitly to match Vec object. Vec Dew.Math.TOpenCLBase.Complex property must be true otherwise an exception is raised.

Examples
TOpenCLValue a;
TOpenCLValue b;
MtxVec.CreateIt(out a, out b);
try
    {
        a.Copy(Cplx(2,3)); // = [2+3i]
        b.RealPart(a); // b = new double[] {2}
    }
finally
    {
        MtxVec.FreeIt(ref a, ref b);
    }
See Also: TOpenCLValue.ImagPart