function RealPart(const Vec: TOpenCLMtxVec): TOpenCLMtxVec;
Gets real part of complex object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec |
Result: stored in self (calling object), returns self for chaining
Remarks:
The method method gets the real 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 property must be true otherwise an exception is raised.
Examples
var a,b: clVector;
begin
a.CopyFromArray(TSingleArray.Create(1,2,3,4)); // = [1+2i, 3+4i]
b.RealPart(a); // b = [1,3]
end;
See Also: clVector.ImagPart
Indexed: function RealPart(const Vec: TOpenCLMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;
Gets the real part of a Vec object complex elements [VecIndex]..[VecIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | |
| 2 | VecIndex | Integer | |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Remarks:
Stores the results in calling object real elements [Index]..[Index+Len-1]. An exception is raised if array borders are overrun or underrun or if Vec object clVector.Complex propety is false.