LEADZ(3I) Last changed: 1-6-98
_leadz, LEADZ - Counts number of leading 0 bits
C/C++
#include <intrinsics.h>
int _leadz (long i)
Fortran:
LEADZ ([I=]i)
C/C++: UNICOS and UNICOS/mk systems
Fortran: UNICOS, UNICOS/mk, and IRIX systems
C/C++: Cray Research extension
Fortran: CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
90
This intrinsic function counts the number of leading 0 bits in i.
FORTRAN NOTES
LEADZ accepts the following argument:
i A Boolean, integer, real, or Cray pointer value.
LEADZ is an elemental function. The name of this function cannot be
passed as an argument.
C/C++ NOTES
Because _leadz is an intrinsic function, no externally visible library
function is available for it. The compiler generates inline code to
produce the result.
FORTRAN RETURN VALUES
LEADZ returns a value of type integer.
The following section of Fortran code shows the LEADZ function used
with an argument of type integer. The bit pattern of the argument and
the value of the result are also given. For simplicity, a 16-bit
object is used.
INTEGER I1, I2
...
I2 = LEADZ(I1)
---------------------------------------------------------------
| 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
---------------------------------------------------------------
I1
The LEADZ function returns the value 5 to the integer variable I2.
A complete list of C/C++ intrinsic functions available on Cray
Research systems is in the Cray C/C++ Reference Manual, publication SR
-2179.
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
LEADZ(3I) Last changed: 1-6-98
_leadz, LEADZ - Counts number of leading 0 bits
C/C++
#include <intrinsics.h>
int _leadz (long i)
Fortran:
LEADZ ([I=]i)
C/C++: UNICOS and UNICOS/mk systems
Fortran: UNICOS, UNICOS/mk, and IRIX systems
C/C++: Cray Research extension
Fortran: CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
90
This intrinsic function counts the number of leading 0 bits in i.
FORTRAN NOTES
LEADZ accepts the following argument:
i A Boolean, integer, real, or Cray pointer value.
LEADZ is an elemental function. The name of this function cannot be
passed as an argument.
C/C++ NOTES
Because _leadz is an intrinsic function, no externally visible library
function is available for it. The compiler generates inline code to
produce the result.
FORTRAN RETURN VALUES
LEADZ returns a value of type integer.
The following section of Fortran code shows the LEADZ function used
with an argument of type integer. The bit pattern of the argument and
the value of the result are also given. For simplicity, a 16-bit
object is used.
INTEGER I1, I2
...
I2 = LEADZ(I1)
---------------------------------------------------------------
| 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
---------------------------------------------------------------
I1
The LEADZ function returns the value 5 to the integer variable I2.
A complete list of C/C++ intrinsic functions available on Cray
Research systems is in the Cray C/C++ Reference Manual, publication SR
-2179.
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|