This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: out-of-line and arch-specific random_device
- From: Andi Kleen <andi at firstfloor dot org>
- To: Ulrich Drepper <drepper at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Tue, 28 Aug 2012 06:14:18 -0700
- Subject: Re: out-of-line and arch-specific random_device
- References: <CAOPLpQeKJrrFPjKQgtvo6rt87bGNy0YZhtL2Y=dnVfn8Ug+F0w@mail.gmail.com>
Ulrich Drepper <drepper@gmail.com> writes:
>
> Anyway, another change in the patch is support for a less expensive
> implementation on Ivy Bridge processors. That processor has the
> rdrand instruction. The code uses it if the instruction is usable.
> Has been tested on real hardware. This is not the type of
> arch-specific code I meant earlier. Will get to that tomorrow.
RDRAND is more for cryptographic purposes (key generation etc.), it's not
supposed to replace pseudo random generators for simulations.
For those you likely want a repeatable stream anyways, otherwise it'll
be impossible to debug.
-Andi
--
ak@linux.intel.com -- Speaking for myself only