__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
__nameis a synonym of__builtin_name. - The built-in function in the form of
__nameis 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_darnreturns a random number in the range0to0xFFFFFFFF_FFFFFFFE.0xFFFFFFFF_FFFFFFFFindicates an error condition. The result has been processed by hardware to reduce bias.__builtin_darn_32returns a random number in the range0to0xFFFFFFFF. The result has been processed by hardware to reduce bias.__builtin_darn_rawreturns a random number in the range0to0xFFFFFFFF_FFFFFFFE.0xFFFFFFFF_FFFFFFFFindicates an error condition.