https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94087

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://software.intel.com/sites/default/files/managed/98/4a/DRNG_Software_Implementation_Guide_2.1.pdf

5.3.1 Retry Recommendations
...
If only one thread is calling RDSEED infrequently, it is very unlikely that a
random seed
will not be available. Only during periods of heavy demand, such as when one
thread is 
calling RDSEED in rapid succession or multiple threads are calling RDSEED
simultaneously, are underflows likely to occur. 
...
5.3.1.2 Asynchronous applications
The application should be prepared to give up on RDSEED after a small number of
retries, where "small" is somewhere between 1 and 100, depending on the
application's
sensitivity to delays. As with synchronous applications, it is recommended that
a PAUSE
instruction be inserted into the retry loop.
Applications needing a more aggressive approach can alternate between RDSEED
and
RDRAND, pulling seeds from RDSEED as they are available and filling a RDRAND
buffer for future 512:1 reduction when they are not.
---- CUT ---

Reply via email to