__builtin_darn, __builtin_darn_32, __builtin_darn_raw

Purpose

Delivers a random number.

This built-in function is valid only when -qarch(-mcpu) is set to utilize POWER9™ technology.

Prototype

long long __builtin_darn (void);

int __builtin_darn_32 (void);

long long __builtin_darn_raw (void);

Usage

  • __builtin_darn returns a random number in the range 0 to 0xFFFFFFFF_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 range 0 to 0xFFFFFFFF. The result has been processed by hardware to reduce bias.
  • __builtin_darn_raw returns a random number in the range 0 to 0xFFFFFFFF_FFFFFFFE. 0xFFFFFFFF_FFFFFFFF indicates an error condition.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us