VF_square | VD_square | VE_square |
VFx_square | VDx_square | VEx_square |
VFu_square | VDu_square | VEu_square |
VFux_square | VDux_square | VEux_square |
VCF_square | VCD_square | VCE_square |
VCFx_square | VCDx_square | VCEx_square |
VCFu_square | VCDu_square | VCEu_square |
VCFux_square | VCDux_square | VCEux_square |
VPF_square | VPD_square | VPE_square |
VPFu_square | VPDu_square | VPEu_square |
|
|
Syntax C/C++ | #include <VFmath.h>
int VF_square( fVector Y, fVector X, ui size );
int VFx_square( fVector Y, fVector X, ui size, float A, float B );
int VFu_square( fVector Y, fVector X, ui size );
int VFux_square( fVector Y, fVector X, ui size, float A, float B ); |
C++ VecObj | #include <OptiVec.h>
int vector<T>::square( const vector<T>& X );
int vector<T>::x_square( const vector<T>& X, const T& A, const T& B );
int vector<T>::u_square( const vector<T>& X );
int vector<T>::ux_square( const vector<T>& X, const T& A, const T& B ); |
Pascal/Delphi | uses VFmath;
function VF_square( Y, X:fVector; size:UIntSize ): IntBool;
function VFx_square( Y, X:fVector; size:UIntSize; A, B:Single ): IntBool;
function VFu_square( Y, X:fVector; size:UIntSize ): IntBool;
function VFux_square( Y, X:fVector; size:UIntSize; A, B:Single ): IntBool; |
|
CUDA function C/C++ | #include <cudaVFmath.h>
int cudaVF_square( fVector d_Y, fVector d_X, ui size );
int cudaVFx_square( fVector d_Y, fVector d_X, ui size, float A, float B );
int cusdVFx_square( fVector d_Y, fVector d_X, ui size, float *d_A, float *d_B );
int VFucu_square( fVector h_Y, fVector h_X, ui size );
int VFuxcu_square( fVector h_Y, fVector h_X, ui size, float A, float B );
int cudaVFu_square( fVector d_Y, fVector d_X, ui size );
int cudaVFux_square( fVector d_Y, fVector d_X, ui size, float A, float B );
int cusdVFux_square( fVector d_Y, fVector d_X, ui size, float *d_A, float *d_B );
int VFucu_square( fVector h_Y, fVector h_X, ui size );
int VFuxcu_square( fVector h_Y, fVector h_X, ui size, float A, float B );
|
CUDA function Pascal/Delphi | uses VFmath;
function cudaVF_square( d_Y, d_X:fVector; size:UIntSize ): IntBool;
function cudaVFx_square( d_Y, d_X:fVector; size:UIntSize; A, B:Single ): IntBool;
function cusdVFx_square( d_Y, d_X:fVector; size:UIntSize; d_A, d_B:PSingle ): IntBool;
function VFcu_square( h_Y, h_X:fVector; size:UIntSize ): IntBool;
function VFxcu_square( h_Y, h_X:fVector; size:UIntSize; A, B:Single ): IntBool;
function cudaVFu_square( d_Y, d_X:fVector; size:UIntSize ): IntBool;
function cudaVFux_square( d_Y, d_X:fVector; size:UIntSize; A, B:Single ): IntBool;
function cusdVFux_square( d_Y, d_X:fVector; size:UIntSize; d_A, d_B:PSingle ): IntBool;
function VFucu_square( h_Y, h_X:fVector; size:UIntSize ): IntBool;
function VFuxcu_square( h_Y, h_X:fVector; size:UIntSize; A, B:Single ): IntBool;
|
|
Description | simple versions: Yi = Xi2
expanded versions: Yi = (A*Xi+B)2
The "unprotected" versions (prefix VFu_, VFux_, etc.) do not perform any error handling, which makes them much faster, but riskier than the standard versions. The extended-precision complex (VCEu_ and VCEux_) versions do not take some of the security measures present in the standard version and might fail for results very near the overflow limit; results near the underflow limit might be rendered as 0. |
|
Error handling | OVERFLOW errors lead to a default result of HUGE_VAL. |
|
Return value | FALSE (0), if no error occurred, otherwise TRUE (non-zero) |
|
|