vec_slv

Purpose

Left shifts the elements of a given vector by a given number of bits.

This built-in function is valid only when -qarch(-mcpu) is set to utilize the POWER9™ technology and the altivec.h file is included.

Syntax

d=vec_slv(a, b)

Result and argument types

The result and arguments are all of the vector unsigned char type.

Result value

Suppose the following information. Element i of the result vector contains the same bit string as bit Si - bit Si+7 of Xi.
  • Si (0<=i<=15) denotes the value in the three least-significant bits of element i of b.
  • Xi (0<=i<=14) denotes the halfword formed by concatenating elements i and i+1 of a.
  • X15 denotes the halfword formed by concatenating element 15 of a and a zero byte.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us