VF_cosrpiVD_cosrpiVE_cosrpi
VF_cosrpi2VD_cosrpi2VE_cosrpi2
VF_cosrpi3VD_cosrpi3VE_cosrpi3
FunctionCosine 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/Delphiuses 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/Delphiuses 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;
DescriptionYi = 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 handlingThese functions are error-proof, as long as q ≠ 0.
Return valuealways FALSE (0)
See alsoVF_cos,   cos

VectorLib Table of Contents  OptiVec home