FunctionScalar 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/Delphiuses 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/Delphiuses 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;
Descriptionscalprod = 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.
Error handlingnone
Return valueproduct
See alsoVF_prod,   VF_xprod,   VF_sum,   VF_ssq

VectorLib Table of Contents  OptiVec home