TOpenCLMatrix.RealToCplx Method

Overload List

#SignatureDescription
1function RealToCplx(const ReVec: TOpenCLMtxVec; const ImVec: TOpenCLMtxVec): TOpenCLMtxVec;Constructs a complex object from two real objects.
2function RealToCplx(const ReVec: TOpenCLMtxVec; const ImVec: TOpenCLMtxVec; ReIndex: Integer; ImIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;Construct a complex object from the ReVec elements [ReIndex]..[ReIndex+Len-1] (real part) and the ImVec elements [ImIndex]..[ImIndex+Len-1] (imaginary part).

Overload 1: function RealToCplx(const ReVec: TOpenCLMtxVec; const ImVec: TOpenCLMtxVec): TOpenCLMtxVec;

Constructs a complex object from two real objects.

#NameTypeDescription
1ReVecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2ImVecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix

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

Remarks:

Construct a complex object from the ReVec (real part) and the ImVec (imaginary part) objects. The results are stored in the calling object. Size and TOpenCLBase.Complex properties of the calling object are set implicitly to match ReVec and ImVec objects. An exception is raised if ReVec or ImVec TOpenCLBase.Complex property is True.

Examples
var a,b,c: clMatrix;
begin
    a.CopyFromArray(2,2,TSingleArray.Create(1,2,3,4));
    b.CopyFromArray(2,2,TSingleArray.Create(2,2,3,4));
    c.RealToCplx(a,b);
end;

Overload 2: function RealToCplx(const ReVec: TOpenCLMtxVec; const ImVec: TOpenCLMtxVec; ReIndex: Integer; ImIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

Construct a complex object from the ReVec elements [ReIndex]..[ReIndex+Len-1] (real part) and the ImVec elements [ImIndex]..[ImIndex+Len-1] (imaginary part).

#NameTypeDescription
1ReVecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2ImVecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
3ReIndexInteger
4ImIndexInteger
5IndexIntegerstart index
6LenIntegerelement count

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

Remarks:

The results are stored to calling object elements [Index]..[Index+Len-1]. Size and TOpenCLBase.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun. An exception is also raised if ReVec or ImVec TOpenCLBase.Complex property is True.