VI_sum | VBI_sum | VSI_sum | VLI_sum | VQI_sum | |
VU_sum | VUB_sum | VUS_sum | VUL_sum | VUQ_sum | VUI_sum |
|
Function | Sum up all the elements of a vector. |
|
Syntax C/C++ | #include <VFstd.h>
float VF_sum( fVector X, ui size ); |
C++ VecObj | #include <OptiVec.h>
T vector<T>::sum(); |
Pascal/Delphi | uses VFstd;
function VF_sum( X:fVector; size:UIntSize ): Single;
function VCF_sum( X:cfVector; size:UIntSize ):fComplex;
Alternative syntax for the complex types (obsolete, but still supported):
procedure VCF_sum( var Sum:fComplex; X:cfVector; size:UIntSize); |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_sum( float *h_RetVal, fVector d_X, ui size );
int cusdVF_sum( float *d_RetVal, fVector d_X, ui size );
float VFcu_sum( fVector h_X, ui size );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_sum( var h_RetVal:Single; d_X:fVector; size:UIntSize ): IntBool;
function cusdVF_sum( d_RetVal:PSingle; d_X:fVector; size:UIntSize ): IntBool;
function VFcu_sum( h_X:fVector; size:UIntSize ): Single;
|
|
Description | sum = sum( Xi )
The sum over all elements of a vector is calculated. |
|
Error handling | none (but be careful: this function may easily overflow!) |
|
Return value | sum of the vector elements (except complex versions in Pascal/Delphi). |
|
|