|
inlineconstexpr |
Computes the arithmetic right/left shift operation according to shift sign.
Defined in Header
Parameters
Return value
The value of the arithmetic right/left shift operation according to shift sign is returned
rshr(x, n)
is equivalent to if_else(n>0, shl(x, n), shr(x, n))
if x
is an simd value.N
is the size in bits of the element type of T
, all elements of n must belong to the interval: ]-N, N[
or the result is undefined.rshr(x, n)
is equivalent to x << n
if x
is an simd value.Masked Call
The call eve::rshr[mask](x, ...)
provides a masked version of rshr
which is equivalent to if_else(mask, rshr(x, ...), x)
Example