function Copy(const Src: TOpenCLMtxVec): TOpenCLMtxVec;
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TOpenCLMtxVec | source 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: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;
Copy Vec elements [VecIndex]..[VecIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | VecIndex | Integer | |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element 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.