TOpenCLVector::ImagPart Method

Overload List

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

Overload 1: TOpenCLBase *ImagPart(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 *ImagPart(TOpenCLMtxVec *Vec);

Gets the imaginary part of a complex object.

#NameTypeDescription
1VecTOpenCLMtxVec *
Remarks:

Gets the imaginary 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 must be true otherwise the exception will be 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<double>{1,2,3,4});  // a= [1+2i, 3+4i]
    b->ImagPart(a);  // b = [2, 4]
    FreeIt(a,b);
}
See Also: TOpenCLVector::RealPart, TOpenCLVector::RealToCplx
Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

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

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

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

Stores the result in calling object. An exception is raised if the calling object is complex, if Vec is not complex or if array borders are overrun/underrun.

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