VF_sincosrpi | VD_sincosrpi | VE_sincosrpi |
VF_sincosrpi2 | VD_sincosrpi2 | VE_sincosrpi2 |
VF_sincosrpi3 | VD_sincosrpi3 | VE_sincosrpi3 |
|
Function | Sine and cosine of fractional multiples of p |
|
Syntax C/C++ | #include <VFmath.h>
int VF_sincosrpi( fVector YSin, fVector YCos, iVector P, ui size, int q );
int VF_sincosrpi2( fVector YSin, fVector YCos, iVector P, ui size, int q );
int VF_sincosrpi3( fVector YSin, fVector YCos, iVector P, ui size, int q ); |
C++ VecObj | #include <OptiVec.h>
int vector<T>::sincosrpi( vector<T> YCos, const vector<int>& P, int q );
int vector<T>::sincosrpi2( vector<T> YCos, const vector<int>& P, int q );
int vector<T>::sincosrpi3( vector<T> YCos, const vector<int>& P, int q ); |
Pascal/Delphi | uses VFmath;
function VF_sincosrpi( YSin, YCos:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_sincosrpi2( YSin, YCos:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_sincosrpi3( YSin, YCos:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool; |
|
CUDA function C/C++ | #include <cudaVFmath.h>
int cudaVF_sincosrpi( fVector d_YSin, fVector d_YCos, iVector d_P, ui size, int q );
int cudaVF_sincosrpi2( fVector d_YSin, fVector d_YCos, iVector d_P, ui size, int q );
int cudaVF_sincosrpi3( fVector d_YSin, fVector d_YCos, iVector d_P, ui size, int q );
int VFcu_sincosrpi( fVector h_YSin, fVector h_YCos, iVector h_P, ui size, int q );
int VFcu_sincosrpi2( fVector h_YSin, fVector h_YCos, iVector h_P, ui size, int q );
int VFcu_sincosrpi3( fVector h_YSin, fVector h_YCos, iVector h_P, ui size, int q );
|
CUDA function Pascal/Delphi | uses VFmath;
function cudaVF_sincosrpi( d_YSin, d_YCos:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_sincosrpi2( d_YSin, d_YCos:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_sincosrpi3( d_YSin, d_YCos:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_sincosrpi( h_YSin, h_YCos:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_sincosrpi2( h_YSin, h_YCos:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_sincosrpi3( h_YSin, h_YCos:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
|
|
Description | YSini = sin( (Pi / q) * p )
YCosi = cos( (Pi / q) * p )
The sine and the cosine of fractional multiples of p are calculated. There are three versions: VF_sincosrpi is for general use with any arbitrary denominator q. If q is a power of 2, VF_sincosrpi2 should be used which is a highly optimized version reading the results from a table named VF_sintab2, if possible. If q is a multiple of 3, VF_sincosrpi3 should be used which utilizes a table named VF_sintab3. The use of VF_sincosrpi3 is a convenient way to use degrees instead of radians; if, for example, q is 180, then the unit of the elements of P is "degree". VF_sincosrpi2 and VF_sincosrpi3 work also with q values they are not optimized for; in this case, however, memory space is wasted for the (then useless) tables. |
|
Error handling | These functions should be error-proof, as long as q≠0. |
|
Return value | always FALSE (0) |
|
|