simdpp::shift_r(scalar)

From libsimdpp-docs
< int
template<unsigned N, class E1>
Ret<N, _DETAIL_> shift_r( const Vec1<N,E1>& a, unsigned shift );
template<unsigned shift, unsigned N, class E1>
Ret<N, _DETAIL_> shift_r( const Vec1<N,E1>& a );

Shifts values in the given integer vector right by shift bits. Zeroes are shifted in for unsigned vectors, sign bits is shifted in for signed vectors.

The number of bits to shift must be between 0 and e_bits - 1 inclusive, where e_bits is the number of bits in the element type.

The implementation behaves as if the following set of overloads is provided:

Ret Vec1
int8 int8
uint8 uint8
int16 int16
uint16 uint16
int32 int32
uint32 uint32
int64 int64
uint64 uint64

The return type is a vector expression.

Parameters[edit]

a - integer vector
shift - the number of bits to shift

Return value[edit]

A vector expression evaluating to a >> shift.

Equivalent operation[edit]

r0 = a0 >> shift
...
rN = aN >> shift

See also[edit]

performs right shift by vector
(function template)