VI_modV | VBI_modV | VSI_modV | VLI_modV | VQI_modV | |
VU_modV | VUB_modV | VUS_modV | VUL_modV | VUQ_modV | VUI_modV |
|
Function | Modulus, i.e. the remainder of a division of corresponding vector elements |
|
Syntax C/C++ | #include <VFmath.h>
void VF_modV( fVector Z, fVector X, fVector Y, ui size );
void VFx_modV( fVector Z, fVector X, fVector Y, ui size, float A, float B ); |
C++ VecObj | #include <OptiVec.h>
void vector<T>::modV( const vector<T>& X, const vector<T>& Y );
void vector<T>::x_modV( const vector<T>& X, const vector<T>& Y, const T& A, const T& B ); |
Pascal/Delphi | uses VFmath;
procedure VF_modV( Z, X, Y:fVector; size:UIntSize );
procedure VFx_modV( Z, X, Y:fVector; size:UIntSize; A, B:Single ); |
|
CUDA function C/C++ | #include <cudaVFmath.h>
int cudaVF_modV( fVector d_Z, fVector d_X, fVector d_Y,ui size );
int cudaVFx_modV( fVector d_Z, fVector d_X, fVector d_Y, ui size, float A, float B );
int cusdVFx_modV( fVector d_Z, fVector d_X, fVector d_Y, ui size, float *d_A, float *d_B );
void VFcu_modV( fVector h_Z, fVector h_X, fVector h_Y,ui size );
void VFxcu_modV( fVector h_Z, fVector h_X, fVector h_Y, ui size, float A, float B );
|
CUDA function Pascal/Delphi | uses VFmath;
function cudaVF_modV( d_Z, d_X, d_Y:fVector; size:UIntSize ): IntBool;
function cudaVFx_modV( d_Z, d_X, d_Y:fVector; size:UIntSize; A, B:Single ): IntBool;
function cusdVFx_modV( d_Z, d_X, d_Y:fVector; size:UIntSize; d_A, d_B:PSingle ): IntBool;
procedure VFcu_modV( h_Z, h_X, h_Y:fVector; size:UIntSize );
procedure VFxcu_modV( h_Z, h_X, h_Y:fVector; size:UIntSize; A, B:Single );
|
|
Description | simple versions: Zi = Xi mod Yi
expanded versions: Zi = (A * Xi + B) mod Yi
Floating-point versions: an argument Xi = 0.0 leads to Zi being 0.0, independently of Yi (as in the ANSI C math function fmod).
Integer versions: an argument Xi = 0 leads to a ZERODIVIDE error (as in the intrinsic "%" operation of ANSI C). |
|
|
Return value | none (also the floating-point versions are treated as basic arithmetic rather than mathematical functions, despite their relation to the math function fmod). |
|
|