TOpenCLValue *RealPart(TOpenCLValue *Vec) const;
Gets real part of complex object value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLValue * |
Remarks:
The method method gets the real part of a complex object Vec and stores the real result in the calling object. FloatPrecision and clValue::Complex properties of the calling object are set implicitly to match Vec object. Vec clValue::Complex property must be true otherwise an exception is raised.
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;
a.Copy(Cplx(2, 3)); // = [2+3i]
b.RealPart(a); // b = [2]
}
See Also: clValue::ImagPart
Declared in Dew::Math::clValue · Dew.Math/clMtxExpr.h · Cross-compiler