Next: Array Combining Scatter Functions
Up: HPF Library Module
Previous: Example of New Reduction
There are three new functions in this class plus the new intrinsic
ILEN:
- LEADZ -- number of leading zeros
- POPCNT -- number of 1 bits
- POPPAR -- parity of integer
All functions are elemental but must take INTEGER arguments and
report on the bit patterns of INTEGER variables. The
Fortran 90 Standard (Section 13.5.7) explains how integers are interpreted.
Consider the artificial binary number I = 00001011,
- LEADZ(I) is 4
- POPCNT(I) is 3
- POPPAR(I) is 1 (the alternative is 0)
The result is always of
the same kind as the argument.
Return to corresponding overview page
Next: Array Combining Scatter Functions
Up: HPF Library Module
Previous: Example of New Reduction
©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997Not for commercial use.