__darn, __builtin_darn, __darn_32, __builtin_darn_32, __darn_raw, __builtin_darn_raw
Purpose
Delivers a random number.
Note: This built-in function
is valid only when the -mcpu option is set to target POWER9 processors
or higher.
Prototype
long long __builtin_darn (void)1;
int __builtin_darn_32 (void);
long long __builtin_darn_raw (void)1;
long long __darn (void)1;
int __darn_32 (void);
long long __darn_raw (void)1;
Note:
- This built-in function is 64-bit only.
Note:
- The built-in function in the form of
__name
is a synonym of__builtin_name
. - The built-in function in the form of
__name
is provided for compatibility with IBM® XL C/C++ for AIX® 16.1.0 or earlier releases. This built-in function might be deprecated in the future.
Usage
__builtin_darn
returns a random number in the range0
to0xFFFFFFFF_FFFFFFFE
.0xFFFFFFFF_FFFFFFFF
indicates an error condition. The result has been processed by hardware to reduce bias.__builtin_darn_32
returns a random number in the range0
to0xFFFFFFFF
. The result has been processed by hardware to reduce bias.__builtin_darn_raw
returns a random number in the range0
to0xFFFFFFFF_FFFFFFFE
.0xFFFFFFFF_FFFFFFFF
indicates an error condition.