This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This is done in the attached patch. It's rather ugly because of the business with the TR1 support. Is this really still needed? Can't we remove that? It really makes not much sense for a random_device to be predictable.
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.
There are other architectures with similar instructions. Adding support for those will be simple.
I assume they are different enough that they can't all be abstracted behind a nice common builtin (with default implementation in libgcc and/or a macro advertising fast implementations of it) :-(
-- Marc Glisse
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |