vec_sll
Purpose
Left shifts a vector by a given number of bits.
This built-in function is valid only when you include the altivec.h file.
Syntax
d=vec_sll(a, b)
Result and argument types
The following table describes the types of the returned value and the function arguments.
| d | a | b1 |
|---|---|---|
| The same type as argument a | vector bool char | Any of the following
types: vector unsigned char |
| 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 |
Note:
- 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 left 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.


