VF_runsum | VD_runsum | VE_runsum |
VCF_runsum | VCD_runsum | VCE_runsum |
VI_runsum | VBI_runsum | VSI_runsum | VLI_runsum | VQI_runsum | |
VU_runsum | VUB_runsum | VUS_runsum | VUL_runsum | VUQ_runsum | VUI_runsum |
|
Function | "running" sum, also called "cumulative sum" or "inclusive sum-scan" |
|
Syntax C/C++ | #include <VFstd.h>
void VF_runsum( fVector Y, fVector X, ui size ); |
C++ VecObj | #include <OptiVec.h>
void vector<T>::runsum( const vector<T>& X ); |
Pascal/Delphi | uses VFstd;
procedure VF_runsum( Y, X:fVector; size:UIntSize ); |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_runsum( fVector d_Y, fVector d_X, ui size );
void VFcu_runsum( fVector h_Y, fVector h_X, ui size );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_runsum( d_Y, d_X:fVector; size:UIntSize );
procedure VFcu_runsum( h_Y, h_X:fVector; size:UIntSize );
|
|
Description | Each element of Y is the sum of the corresponding and all preceding elements of X. |
|
Error handling | none (but be careful: this function may easily overflow!) |
|
|
|