vec_cntm
Purpose
Counts the number of elements with their high-order bit equal to a specific value.
Note: This built-in function
is valid only when the -mcpu option is set to target Power10 processors.
Syntax
d=vec_cntm(a, b)
Result and argument types
The following table describes the types of the returned value and the function arguments.
| d | a | b |
|---|---|---|
| unsigned long long | vector unsigned char | const unsigned char |
| vector unsigned short | ||
| vector unsigned int | ||
| vector unsigned long long |
Result value
Let N be 7 when a is a vector unsigned char, 6 when a is a vector unsigned
short, 5 when a is a vector
unsigned int, and 4 when
a is a vector unsigned long long.
Then bits 0:N of d are set to the number of elements in a with their high-order bit equal to b, which must be either 0 or
1.
Bits N+1:53 of d are
set to 0.