VI_modC | VBI_modC | VSI_modC | VLI_modC | VQI_modC | |
VU_modC | VUB_modC | VUS_modC | VUL_modC | VUQ_modC | VUI_modC |
|
Function | Modulus, i.e. the remainder of a division by a constant |
|
Syntax C/C++ | #include <VFmath.h>
void VF_modC( fVector Y, fVector X, ui size, float C ); |
C++ VecObj | #include <OptiVec.h>
void vector<T>::modC( const vector<T>& X, const T& C ); |
Pascal/Delphi | uses VFmath;
procedure VF_modC( Y, X:fVector; size:UIntSize; C:Single ); |
|
CUDA function C/C++ | #include <cudaVFmath.h>
#include <cudaVDmath.h>
int cudaVF_modC( fVector d_Y, fVector d_X, ui size, float C );
int cusdVF_modC( fVector d_Y, fVector d_X, ui size, float *d_C );
void VFcu_modC( fVector d_Y, fVector d_X, ui size, float C );
|
CUDA function Pascal/Delphi | uses VFmath, VDmath;
function cudaVF_modC( d_Y, d_X:fVector; size:UIntSize; C:Single ): IntBool;
function cusdVF_modC( d_Y, d_X:fVector; size:UIntSize; d_C:PSingle ): IntBool;
procedure VF_modC( Y, X:fVector; size:UIntSize; C:Single );
|
|
Description | Yi = Xi mod C
Floating-point versions: a constant C = 0.0 leads to all Yi being 0.0, independently of the Xi values (as in the ANSI C math function fmod ).
Integer versions: a constant C = 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). |
|
|