TOpenCLVector::SinCos Method

Overload List

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

Overload 1: void SinCos(TOpenCLBase *SinX, TOpenCLBase *CosX, int SinXIndex, int CosXIndex, int Index, int Len);

#NameTypeDescription
1SinXTOpenCLBase *
2CosXTOpenCLBase *
3SinXIndexint
4CosXIndexint
5Indexint
6Lenint
Declared in Dew::Math::TOpenCLBase · Dew.Math/clMtxVec.h · Cross-compiler

Overload 2: void SinCos(TOpenCLMtxVec *SinX, TOpenCLMtxVec *CosX);

Sine and cosine.

#NameTypeDescription
1SinXTOpenCLMtxVec *
2CosXTOpenCLMtxVec *
Remarks:

Calculates the sine and cosine for all calling object elements and stores the sines to SinX and cosines to CosX. Size and TOpenCLBase::Complex property of SinX and CosX are adjusted automatically.

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

Examples
#include "Math387.h"
#include "clMtxVec.h"
#include "Units.clMtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::ClMtxVec;

void Example()
{
    TOpenCLVector *a, *s, *c;
    CreateIt(a, s, c);
    a->CopyFromArray( DewArray<double>{0,PIDIV2,PI});
    a->SinCos(s,c); // s=[0,1,0], c =[1,0,-1]
    FreeIt(a, s, c);
}
See Also: TOpenCLVector::Sin, TOpenCLVector::Cos
Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 3: void SinCos(TOpenCLMtxVec *SinX, TOpenCLMtxVec *CosX, int SinXIndex, int CosXIndex, int Index, int Len);

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

#NameTypeDescription
1SinXTOpenCLMtxVec *
2CosXTOpenCLMtxVec *
3SinXIndexint
4CosXIndexint
5Indexint
6Lenint
Remarks:

stores the sines to SinX elemets [SinXIndex]..[SinXIndex+Len-1] and cosines to CosX elements [CosXIndex]..[CosXIndex+Len-1] elements. Size and TOpenCLBase::Complex property of SinX and CosX objects are not set automatically. An exception is raised if array borders are overrun/underun.

Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler