Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

<span class='option'> _rdrand16_step()</span>, <span class='option'> _rdrand32_step()</span>, <span class='option'> _rdrand64_step()</span>

Generate random numbers of 16/32/64 bit wide random integers. These intrinsics are mapped to the hardware instruction RDRAND.

Syntax

extern int _rdrand16_step(unsigned short *random_val);

extern int _rdrand32_step(unsigned int *random_val);

extern int _rdrand64_step(unsigned __int64 *random_val);

Description

These intrinsics generate random numbers of 16/32/64 bit wide random integers. The generated random value is written to the given memory location and the success status is returned: '1' if the hardware returned a valid random value, and '0' otherwise.

Returns

1 : if the hardware returns a 16/32/64 random value.

0 : if the hardware does not return any random value.