clVector.SinCos Method

Overload List

#SignatureDescription
1void SinCos(TOpenCLMtxVec SinX, TOpenCLMtxVec CosX)Sine and cosine.
2void SinCos(TOpenCLMtxVec SinX, TOpenCLMtxVec CosX, Int32 SinXIndex, Int32 CosXIndex, Int32 Index, Int32 Len)Calculates the sine and cosine for calling object elements [Index]..[Index+Len-1].

Overload 1: void SinCos(TOpenCLMtxVec SinX, TOpenCLMtxVec CosX)

Sine and cosine.

#NameTypeDescription
1SinXTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2CosXTOpenCLMtxVecsource 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 Dew.Math.clVector.Complex property of SinX and CosX are adjusted automatically.

Note
Use this method if you require both sine and cosine.

Examples
clVector a;
s,c: clVector;
a.CopyFromArray(TSingleArray.Create(0,PiDiv2,PI));
a.SinCos(s,c); // s=new double[] {0,1,0}, c =new double[] {1,0,-1}
See Also: clVector.Sin, clVector.Cos

Overload 2: void SinCos(TOpenCLMtxVec SinX, TOpenCLMtxVec CosX, Int32 SinXIndex, Int32 CosXIndex, Int32 Index, Int32 Len)

Calculates the sine and cosine for calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1SinXTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2CosXTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
3SinXIndexInt32
4CosXIndexInt32
5IndexInt32start index
6LenInt32element 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 Dew.Math.clVector.Complex property of SinX and CosX objects are not set automatically. An exception is raised if array borders are overrun/underun.