C/C++ and Fortran

 View Only

POWER8 built-in function vec_bperm

By Archive User posted Wed November 26, 2014 04:33 AM

  

Originally posted by: TracyR


For vector processing, IBM XL C/C++ for Linux V13.1 supports a new POWER8 built-in function vec_bperm. The vec_bperm can gather up to 16-bit values from a quadword in the specified order and it operates on vectors as 128-bit unsigned integers. The vec_bperm function is valid only when the -qarch option is set to target POWER8™ processors.

Syntax

The function has the following syntax, where d represents the function returned value; a and b represent the arguments.

d=vec_bperm(a, b)

Result and argument types

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

d

a

b

vector unsigned char

vector unsigned char

vector unsigned char

 

Result value

The following table describes the function result. For each i (0 <= i < 16), let index denote the byte value of the ith element of the argument b.

Value of index

Function result

index >= 128

bit 48+i of the result is set to 0.

index < 128

bit 48+i of the result is set to the value of the indexth bit of the input a.

 

 

0 comments
1 view

Permalink