VF_sgnVD_sgnVE_sgn
FunctionSignum function, compares each element of a vector with 0.
Syntax C/C++#include <VFmath.h>
void VF_sgn( fVector Y, fVector X, ui size );
C++ VecObj#include <OptiVec.h>
void vector<T>::sgn( const vector<T>& X );
Pascal/Delphiuses VFmath;
procedure VF_sgn( Y, X:fVector; size:UIntSize );
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_sgn( fVector d_Y, fVector d_X, ui size );
void VFcu_sgn( fVector h_Y, fVector h_X, ui size );
CUDA function Pascal/Delphiuses VFmath;
function cudaVF_sgn( d_Y, d_X:fVector; size:UIntSize ): IntBool;
procedure VFcu_sgn( h_Y, h_X:fVector; size:UIntSize );
DescriptionEach element of X is compared with 0 and the result of the comparison stored in Y:
Yi = +1.0, if Xi > 0
Yi =   0.0, if Xi = 0
Yi =  -1.0, if Xi < 0.
This function is identical to VF_cmp0.
Error handlingnone
Return valuenone
See alsoVF_cmp_...,   VF_cmpC,   VF_cmpV

VectorLib Table of Contents  OptiVec home