Overload List
| # | Signature | Description |
|---|---|---|
| 1 | procedure SinCos(SinX: TOpenCLMtxVec; CosX: TOpenCLMtxVec); | Sine and cosine. |
| 2 | procedure SinCos(SinX: TOpenCLMtxVec; CosX: TOpenCLMtxVec; SinXIndex: Integer; CosXIndex: Integer; Index: Integer; Len: Integer); | Calculates the sine and cosine for calling object elements [Index]..[Index+Len-1]. |
Overload 1: procedure SinCos(SinX: TOpenCLMtxVec; CosX: TOpenCLMtxVec);
Sine and cosine.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | SinX | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | CosX | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object)
Remarks:
Calculates the sine and cosine for all calling object elements and stores the sines to SinX and cosines to CosX. Size and clVector.Complex property of SinX and CosX are adjusted automatically.
Note
Use this method if you require both sine and cosine.
Examples
var a: clVector;
s,c: clVector;
begin
a.CopyFromArray(TSingleArray.Create(0,PiDiv2,PI));
a.SinCos(s,c); // s=[0,1,0], c =[1,0,-1]
end;
See Also: clVector.Sin, clVector.Cos
Overload 2: procedure SinCos(SinX: TOpenCLMtxVec; CosX: TOpenCLMtxVec; SinXIndex: Integer; CosXIndex: Integer; Index: Integer; Len: Integer);
Calculates the sine and cosine for calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | SinX | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | CosX | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 3 | SinXIndex | Integer | |
| 4 | CosXIndex | Integer | |
| 5 | Index | Integer | start index |
| 6 | Len | Integer | element count |
Result: stored in self (calling object)
Remarks:
stores the sines to SinX elements [SinXIndex]..[SinXIndex+Len-1] and cosines to CosX elements [CosXIndex]..[CosXIndex+Len-1] elements. Size and clVector.Complex property of SinX and CosX objects are not set automatically. An exception is raised if array borders are overrun/underun.