VF_scalprod | VD_scalprod | VE_scalprod |
|
Function | Scalar product of two vectors |
|
Syntax C/C++ | #include <VFstd.h>
float VF_scalprod( fVector X, fVector Y, ui size ); |
C++ VecObj | #include <OptiVec.h>
T vector<T>::scalprod( const vector<T>& Y ); |
Pascal/Delphi | uses VFstd;
function VF_scalprod( X, Y:fVector; size:UIntSize ): Single; |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_scalprod( float *h_RetVal, fVector d_X, fVector d_Y, ui size );
int cusdVF_scalprod( float *d_RetVal, fVector d_X, fVector d_Y, ui size );
float VFcu_scalprod( fVector h_X, fVector h_Y, ui size );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_scalprod( var h_RetVal:Single; d_X, d_Y:fVector; size:UIntSize ): IntBool;
function cusdVF_scalprod( d_RetVal:PSingle; d_X, d_Y:fVector; size:UIntSize ): IntBool;
function VFcu_scalprod( h_X, h_Y:fVector; size:UIntSize ): Single;
|
|
Description | scalprod = sum( Xi * Yi )
The scalar (or dot) product of two vectors is defined as the sum of the products of the corresponding elements. The scalar product of a vector with itself is the square of its magnitude and may be calculated using the function VF_ssq. |
|
|
|
|