VI_cmpC | VBI_cmpC | VSI_cmpC | VLI_cmpC | VQI_cmpC | |
VU_cmpC | VUB_cmpC | VUS_cmpC | VUL_cmpC | VUQ_cmpC | VUI_cmpC |
|
Function | Compares each element of a vector with a constant. |
|
Syntax C/C++ | #include <VFmath.h>
void VF_cmpC( fVector Y, fVector X, ui size, float C );
void VI_cmpC( iVector Y, iVector X, ui size, int C );
void VU_cmpC( iVector Y, uVector X, ui size, unsigned C ); |
C++ VecObj | #include <OptiVec.h>
void vector<T>::cmpC( const vector<T>& X, const T& C );
unsigned integer types: function belongs to corresponding signed integer class:
void vector<T>::cmpC( const vector<unsigned T>& X, const unsigned T& C ); |
Pascal/Delphi | uses VFstd;
procedure VF_cmpC( Y,X:fVector; size:UIntSize; C:Single );
procedure VI_cmpC( Y,X:iVector; size:UIntSize; C:Integer );
procedure VU_cmpC( Y:iVector; X:uVector; size:UIntSize; C:UInt ); |
|
CUDA function C/C++ | #include <cudaVFmath.h>
int cudaVF_cmpC( fVector d_Y, fVector d_X, ui size, float C );
int cusdVF_cmpC( fVector d_Y, fVector d_X, ui size, float *d_C );
void VFcu_cmpC( fVector h_Y, fVector h_X, ui size, float C );
|
CUDA function Pascal/Delphi | uses VFmath;
function cudaVF_cmpC( d_Y, d_X:fVector; size:UIntSize; C:Single ): IntBool;
function cusdVF_cmpC( d_Y, d_X:fVector; size:UIntSize; d_C:PSingle ): IntBool;
procedure VFcu_cmpC( h_Y, h_X:fVector; size:UIntSize; C:Single );
|
|
Description | Each element of X is compared with C and the result of the comparison stored in Y:
Yi = +1.0, if Xi > C
Yi = 0.0, if Xi = C
Yi = −1.0, if Xi < C
For unsigned integer input vectors, the output is of the corresponding signed data type.
To compare with C=0, use more efficiently the function VF_cmp0. |
|
|
|
|