clVector.ImagPart Method

function ImagPart(const Vec: TOpenCLMtxVec): TOpenCLMtxVec;

Gets the imaginary part of a complex object.

#NameTypeDescription
1VecTOpenCLMtxVec

Result: stored in self (calling object), returns self for chaining

Remarks:

Gets the imaginary part of a complex object Vec and stores the real results in the calling object. Size and clVector.Complex properties of the calling object are set implicitly to match Vec object. Vec clVector.Complex must be true otherwise the exception will be raised.

Examples
var a,b: clVector;
begin
    a.CopyCplxFromArray(TSingleArray.Create(1,2,3,4));  // a= [1+2i, 3+4i]
    b.ImagPart(a);  // b = [2, 4]
end;
See Also: clVector.RealPart, clVector.RealToCplx

Indexed: function ImagPart(const Vec: TOpenCLMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

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

#NameTypeDescription
1VecTOpenCLMtxVec
2VecIndexInteger
3IndexIntegerstart index
4LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

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.