VI_shr  VBI_shr  VSI_shr  VLI_shr  VQI_shr 
VU_shr  VUB_shr  VUS_shr  VUL_shr  VUI_shr 

Function  "Shift to the right", i.e., divide by integer powers of 2. 

Syntax C/C++  #include <VImath.h>
void VI_shr( iVector Y, iVector X, ui size,unsigned C );
void VUL_shr( ulVector Y, ulVector X, ui size, unsigned C );
(similarly all other functions of this family) 
C++ VecObj  #include <OptiVec.h>
void vector<T>::shr( const vector<T>& X, unsigned C ); 
Pascal/Delphi  uses VImath;
procedure VI_shr( Y, X:iVector; size:UIntSize; C:UInt );
procedure VUL_shr( Y, X:ulVector; size:UIntSize; C:UInt );
(similarly all other functions of this family) 

Description  Y_{i} = X_{i} >> C
All bits of X_{i} are shifted to the right by as many positions as indicated in the parameter C. This corresponds to an integer division by 2^{C}. The sign of Y_{i} is always the same as of X_{i}. In contrast to explicit integer divisions, the result is always rounded toward minus infinity: 15 / 2 = 7, but 15 >> 1 = 8.
Note that by shifting 8bit numbers by more than 7 positions, any unsigned or positive number yields 0, whereas any negative number yields 1 in this case.
The same is true for 16bit numbers upon shifting by more than 15 positions, and for 32bit numbers being shifted by more than 31 positions.
C is always of the data type unsigned. Shifting by negative numbers C is, therefore, not possible. To perform a leftshift, the appropriate function of the VI_shl family has to be used. 



