[PATCH] D34157: [llvm-stress] Use C++11 mersenne_twister_engine random device instead of our own (PR32585)
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 12:03:29 PDT 2017
chandlerc requested changes to this revision.
chandlerc added a comment.
This revision now requires changes to proceed.
Rather than using the RNG engine directly and using mod operations, the correct usage pattern is to use a distribution over the desired range and let it pull raw entropy out of the engine while mapping it into whatever distribution the use case requires.
See http://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution for more details.
Repository:
rL LLVM
https://reviews.llvm.org/D34157
More information about the llvm-commits
mailing list