vec_pack

Purpose

Packs information from each element of two vectors into the result vector.

Syntax

d=vec_pack(a, b)

Result and argument types

The following tables describe the types of the returned value and the function arguments.

Table 1. Result and argument types
d a b
vector signed char vector signed short vector signed short
vector unsigned char vector unsigned short vector unsigned short
vector signed short vector signed int vector signed int
vector unsigned short vector unsigned int vector unsigned int

When you call this built-in function, the following types are valid only when -qarch is set to target POWER8® processors.

Table 2. Result and argument types supported only on POWER8 processors
d a b
vector signed int vector signed long long vector signed long long
vector unsigned int vector unsigned long long vector unsigned long long
vector bool long long vector bool long long vector bool long long

Result value

The value of each element of the result vector is taken from the low-order half of the corresponding element of the result of concatenating a and b.



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