VF_ssqdevV | VD_ssqdevV | VE_ssqdevV |
VF_ssqdevVwSaturation | VD_ssqdevVwSaturation | VE_ssqdevVwSaturation |
|
Function | Sum of the squares of the deviations of the elements of one vector from the corresponding elements of another |
|
Syntax C/C++ | #include <VFstd.h>
float VF_ssqdevV( fVector X, fVector Y, ui size );
float VF_ssqdevVwSaturation( fVector X, fVector Y, ui size ); |
C++ VecObj | #include <OptiVec.h>
T vector<T>::ssqdevV( const vector<T>& Y );
T vector<T>::ssqdevVwSaturation( const vector<T>& Y ); |
Pascal/Delphi | uses VFstd;
function VF_ssqdevV( X, Y:fVector; size:UIntSize ): Single;
function VF_ssqdevVwSaturation( X, Y:fVector; size:UIntSize ): Single; |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_ssqdevV( float *h_RetVal, fVector X, fVector Y, ui size );
int cusdVF_ssqdevV( float *d_RetVal, fVector X, fVector Y, ui size );
float VFcu_ssqdevV( fVector h_X, fVector h_Y, ui size );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_ssqdevV( var h_RetVal:Single; d_X, d_Y:fVector; size:UIntSize ): IntBool;
function cusdVF_ssqdevV( d_RetVal:PSingle; d_X, d_Y:fVector; size:UIntSize ): IntBool;
function VFcu_ssqdevV( h_X, h_Y:fVector; size:UIntSize ): Single;
|
|
Description | ssqdevV = sum( (Xi - Yi)2 )
The deviation of each element of X from the corresponding element of Y is calculated and the squares of the deviations summed up and returned.
V?_ssqdevVwSaturation is almost identical to V?_ssqdevV, except for the treatment of infinities and NAN values. While V?_ssqdevV may overflow to INF and will return NAN, if any input element is a NAN, V?_ssqdevVwSaturation will saturate possible overflow into HUGE_VAL and treats input values of ±NAN as ±HUGE_VAL. |
|
|
Return value | sum of the squares of the deviations. |
|
|