TOpenCLVector::RealPart Method

Overload List

#SignatureDescription
1TOpenCLBase *RealPart(TOpenCLBase *Vec, int VecIndex, int Index, int Len);
2TOpenCLMtxVec *RealPart(TOpenCLMtxVec *Vec);Gets real part of complex object values.
3TOpenCLMtxVec *RealPart(TOpenCLMtxVec *Vec, int VecIndex, int Index, int Len);Gets the real part of a Vec object complex elements [VecIndex]..[VecIndex+Len-1].

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: TOpenCLMtxVec *RealPart(TOpenCLMtxVec *Vec);

Gets real part of complex object values.

#NameTypeDescription
1VecTOpenCLMtxVec *
Remarks:

The method method gets the real part of a complex object Vec and stores the real results in the calling object. Size 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 "Units.clMtxVec.h"
#include "clMtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::ClMtxVec;

void Example()
{
    TOpenCLVector *a, *b;

    CreateIt(a, b);
    a->CopyCplxFromArray(DewArray<float>{1, 2, 3, 4}); // = [1+2i, 3+4i]
    b->RealPart(a); // b = [1,3]
    FreeIt(a, b);
}
See Also: TOpenCLVector::ImagPart
Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 3: TOpenCLMtxVec *RealPart(TOpenCLMtxVec *Vec, int VecIndex, int Index, int Len);

Gets the real part of a Vec object complex elements [VecIndex]..[VecIndex+Len-1].

#NameTypeDescription
1VecTOpenCLMtxVec *
2VecIndexint
3Indexint
4Lenint
Remarks:

Stores the results in calling object real elements [Index]..[Index+Len-1]. An exception is raised if array borders are overrun or underrun or if Vec object TOpenCLBase::Complex propety is false.

Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler