TOpenCLValue::RealPart Method

Overload List

#SignatureDescription
1TOpenCLBase *RealPart(TOpenCLBase *Vec, int VecIndex, int Index, int Len);
2TOpenCLValue *RealPart(TOpenCLValue *Vec);Gets real part of the complex value.

Overload 1: TOpenCLBase *RealPart(TOpenCLBase *Vec, int VecIndex, int Index, int Len);

#NameTypeDescription
1VecTOpenCLBase *
2VecIndexint
3Indexint
4Lenint
Declared in Dew::Math::TOpenCLBase · Dew.Math/clMtxVec.h · Cross-compiler

Overload 2: TOpenCLValue *RealPart(TOpenCLValue *Vec);

Gets real part of the complex value.

#NameTypeDescription
1VecTOpenCLValue *
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 TOpenCLBase::Complex properties of the calling object are set implicitly to match Vec object. Vec TOpenCLBase::Complex property must be true otherwise an exception is raised.

Examples
#include "Math387.h"
#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;

    a.Copy(Cplx(2,3)); // = [2+3i]
    b.RealPart(a); // b = [2]
}
See Also: TOpenCLValue::ImagPart
Declared in Dew::Math::TOpenCLValue · Dew.Math/clMtxVec.h · Cross-compiler