Technical data
Intrinsic Functions [D]
The C and C++ intrinsic functions either allow for direct access to some hardware
instructions or result in generation of inline code to perform some specialized
functions. These intrinsic functions are processed completely by the compiler.
In many cases, the generated code is one or two instructions. These are called
functions because they are invoked with the syntax of function calls.
To get access to the intrinsic functions, the Cray Standard C++ compiler requires
that either the intrinsics.h file be included or that the intrinsic functions that
you want to call be explicitly declared. If you explicitly declare an intrinsic
function, the declaration must agree with the documentation or the compiler
treats the call as a call to a normal function, not the intrinsic function. When
using the Cray Standard C compiler, it is not necessary to declare intrinsic
functions. In either case, the -h nointrinsics command line option causes
the compiler to treat these calls as regular function calls and not as intrinsic
function calls.
The types of the arguments to intrinsic functions are checked by the compiler,
and if any of the arguments do not have the correct type, a warning message is
issued and the call is treated as a normal call to an external function. If your
intention was to call an external function with the same name as an intrinsic
function, you should change the external function name. The names used for
the Cray Standard C intrinsic functions are in the name space reserved for the
implementation.
For detailed descriptions of appropriate hardware instructions, see the Symbolic
Machine Instructions Reference Manual.
Note: Several of these intrinsic functions have both a vector and a scalar
version on UNICOS systems. If a vector version of an intrinsic function exists
and the intrinsic is called within a vectorized loop, the compiler uses the vector
version of the intrinsic. See the appropriate intrinsic function man page for
details on whether it has a vector version.
The following table provides a summary of all C and C++ intrinsic functions
and indicates their availability on various platforms. See the appropriate man
page for more information.
S–2179–36 179










