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.
Next: Array Combining Scatter Functions
Up: HPF Library Module
Previous: Example of New Reduction
Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 15:03:35 GMT 1996Not for commercial use.