simdpp::shift_l(vector)

From libsimdpp-docs
< int
template<unsigned N, class E1, class E2>
Ret<N, _DETAIL_> shift_l( const Vec1<N,E1>& a, const Vec2<N,E2>& b );

Shifts values in the given integer vector a left by the number of bits specified in the corresponding elements of the given integer vector b. Zero bits are shifted in.

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

Ret Vec1 Vec2
int8 int8 uint8

(available only if SIMDPP_HAS_UINT8_SHIFT_L_BY_VECTOR evaluates to nonzero value)

uint8 uint8 uint8

(available only if SIMDPP_HAS_INT8_SHIFT_L_BY_VECTOR evaluates to nonzero value)

int16 int16 uint16

(available only if SIMDPP_HAS_UINT16_SHIFT_L_BY_VECTOR evaluates to nonzero value)

uint16 uint16 uint16

(available only if SIMDPP_HAS_INT16_SHIFT_L_BY_VECTOR evaluates to nonzero value)

int32 int32 uint32

(available only if SIMDPP_HAS_INT32_SHIFT_L_BY_VECTOR evaluates to nonzero value)

uint32 uint32 uint32

(available only if SIMDPP_HAS_UINT32_SHIFT_L_BY_VECTOR evaluates to nonzero value)

The return type is a vector expression.

Parameters[edit]

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

Return value[edit]

A vector expression evaluating to a << shift.

Equivalent operation[edit]

r0 = a0 << shift0
...
rN = aN << shiftN

See also[edit]

performs left shift by scalar
(function template)