vec_srl

Purpose

Right shifts a vector by a given number of bits.

Syntax

d=vec_srl(a,b)

Result and argument types

The following table describes the types of the returned value and the function arguments.

Table 1. Result and argument types
d a b1
The same type as argument a vector bool char Any of the following types:
vector unsigned char
vector unsigned short
vector unsigned int
vector signed char
vector unsigned char
vector bool short
vector signed short
vector unsigned short
vector bool int
vector signed int
vector unsigned int
vector pixel
vector signed long long
vector unsigned long long
Note:
  1. The least significant three bits of all byte elements in b must be the same.

Result value

The result is produced by shifting the contents of a right by the number of bits specified by the last three bits of the last element of b. The bits that are shifted out are replaced by zeroes.