+-------------------------------IBM Extension--------------------------------+
Purpose
Population count.
Counts the number of set bits of each byte in a register.
Valid only on POWER5.
Class
Elemental function.
Argument Type and Attributes
An INTENT(IN) argument of type INTEGER(4) or INTEGER(8) in 64-bit mode
Result Type and Attributes
Returns an INTEGER(4) in 32-bit mode.
Returns an INTEGER(8) in 64-bit mode.
Result Value
The number of bits set to on in that byte, in the position of the byte.
Examples
INTEGER I I = x'010300ff' WRITE(*, '(z8.8)') POPCNTB(I) END
Expected output:
01020008
Related Information
+----------------------------End of IBM Extension----------------------------+