VF_cosrpi | VD_cosrpi | VE_cosrpi |
VF_cosrpi2 | VD_cosrpi2 | VE_cosrpi2 |
VF_cosrpi3 | VD_cosrpi3 | VE_cosrpi3 |
|
Function | Cosine function of fractional multiples of p |
|
Syntax C/C++ | #include <VFmath.h>
int VF_cosrpi( fVector Y, iVector P, ui size, int q );
int VF_cosrpi2( fVector Y, iVector P, ui size, int q );
int VF_cosrpi3( fVector Y, iVector P, ui size, int q ); |
C++ VecObj | #include <OptiVec.h>
int vector<T>::cosrpi( const vector<int>& P, int q );
int vector<T>::cosrpi2( const vector<int>& P, int q );
int vector<T>::cosrpi3( const vector<int>& P, int q ); |
Pascal/Delphi | uses VFmath;
function VF_cosrpi( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_cosrpi2( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_cosrpi3( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool; |
|
CUDA function C/C++ | #include <cudaVFmath.h>
int cudaVF_cosrpi( fVector d_Y, iVector d_P, ui size, int q );
int cudaVF_cosrpi2( fVector d_Y, iVector d_P, ui size, int q );
int cudaVF_cosrpi3( fVector d_Y, iVector d_P, ui size, int q );
int VFcu_cosrpi( fVector h_Y, iVector h_P, ui size, int q );
int VFcu_cosrpi2( fVector h_Y, iVector h_P, ui size, int q );
int VFcu_cosrpi3( fVector h_Y, iVector h_P, ui size, int q );
|
CUDA function Pascal/Delphi | uses VFmath;
function cudaVF_cosrpi( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_cosrpi2( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function cudaVF_cosrpi3( d_Y:fVector; d_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cosrpi( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cosrpi2( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
function VFcu_cosrpi3( h_Y:fVector; h_P:iVector; size:UIntSize; q:Integer ): IntBool;
|
|
Description | Yi = cos( (Pi / q) * p )
The cosine of fractional multiples of p is calculated. There are three versions: VF_cosrpi is for general use with any arbitrary denominator q. If q is a power of 2, VF_cosrpi2 should be used which is a highly optimized version reading the results from a look-up table, if possible. If q is a multiple of 3, VF_cosrpi3 should be used. VF_cosrpi3 offers a convenient way to use degrees instead of radians; if, for example, q is 180, the unit of the elements of P is "degree". VF_cosrpi2 and VF_cosrpi3 work also with q values they are not optimized for; in this case, however, memory space is wasted for the tables. |
|
Error handling | These functions are error-proof, as long as q ≠ 0. |
|
Return value | always FALSE (0) |
|
|