TOpenCLMatrix.Copy Method

Overload List

#SignatureDescription
1procedure Copy(const Src: TDenseMtxVec); overload; override;
2procedure Copy(const Src: TMtxVecInt); overload; override;
3function Copy(const Src: TOpenCLMtxVec): TOpenCLMtxVec; overload;Copy object values.
└ indexed: function Copy(const Vec: TOpenCLMtxVec; VecIndex, Index, Len: integer): TOpenCLMtxVec; overload;

Overload 1: procedure Copy(const Src: TDenseMtxVec); overload; override;

#NameTypeDescription
1SrcTDenseMtxVecsource TVec or TMtx

Result: stored in self (calling object)

Overload 2: procedure Copy(const Src: TMtxVecInt); overload; override;

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt

Result: stored in self (calling object)

Overload 3: function Copy(const Src: TOpenCLMtxVec): TOpenCLMtxVec; overload;

Copy object values.

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix

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

Remarks:

Copy each of Vec elements to the calling object. Size and TOpenCLBase.Complex properties of the calling object are set implicitly to match Vec object.

Examples
var a,b,c: clMatrix;
begin
    a.CopyFromArray(2,2,TSingleArray.Create(1,2,3,4));  // a = [1,2,3,4]
    b.Copy(a);                // b = [1,2,3,4]
end;

Indexed: function Copy(const Vec: TOpenCLMtxVec; VecIndex, Index, Len: integer): TOpenCLMtxVec; overload;

Copy Vec elements [VecIndex]..[VecIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2VecIndexinteger
3Indexintegerstart index
4Lenintegerelement count

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

Remarks:

Size and TOpenCLBase.Complex properties must be set explicitly. An exception is raised if array borders are overrun or underrun.