vec_ternarylogic
Purpose
Performs one of the 256 logical operations on three input vectors to produce the output vector.
Note: This built-in function
is valid only when the -mcpu option is set to target Power10 processors.
Syntax
d=vec_ternarylogic(a,b,c,e)
Result and argument types
The following table describes the types of the returned value and the function arguments.
| d | a | b | c | e |
|---|---|---|---|---|
| vector unsigned char | vector unsigned char | vector unsigned char | vector unsigned char | const unsigned int |
| vector unsigned short | vector unsigned short | vector unsigned short | vector unsigned short | const unsigned int |
| vector unsigned int | vector unsigned int | vector unsigned int | vector unsigned int | const unsigned int |
| vector unsigned long long | vector unsigned long long | vector unsigned long long | vector unsigned long long | const unsigned int |
Note:
e must have a value
between 0 and 255, inclusive.Result value
For each integer value i from 0 to 127, let j be the value of the
concatenation of the contents of bit i of a, b, and c. The value of bit j of the 8-bit value in e is placed into bit i of d.