gcc/libstdc++-v3/testsuite/26_numerics
Jonathan Wakely a2d196e75c libstdc++: Use RDRAND as fallback if RDSEED keeps failing (PR 94087)
It's not difficult for multiple threads to drain the entropy available
to the RDSEED instruction, at which point we throw an exception. This
change will try to use RDRAND after RDSEED fails repeatedly, and only
throw if RDRAND also fails repeatedly. This doesn't guarantee a random
value can always be read, but reduces the likelihood of failure when
using the RDSEED instruction.

	PR libstdc++/94087
	* src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
	passed in.
	(__x86_rdseed_rdrand): New function that uses rdseed with rdrand
	fallback.
	(random_device::_M_init): Use __x86_rdseed_rdrand when both
	instructions are available.
	* testsuite/26_numerics/random/random_device/94087.cc: New test.
2020-05-19 23:04:45 +01:00
..
accumulate libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
adjacent_difference libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
bit
complex
endian
exclusive_scan libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
gcd
headers libstdc++: Update the <numeric> synopsis test to latest standard 2020-02-28 15:08:14 -05:00
inclusive_scan libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
inner_product libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
iota libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
lcm
midpoint
numbers
partial_sum libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
pstl/numeric_ops
random libstdc++: Use RDRAND as fallback if RDSEED keeps failing (PR 94087) 2020-05-19 23:04:45 +01:00
reduce libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
slice libstdc++: Add comparison operators to types from Numerics clause 2020-04-08 16:51:59 +01:00
slice_array
transform_exclusive_scan libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
transform_inclusive_scan libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
transform_reduce libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
valarray
lerp.cc