[PATCH] D16419: Use std::piecewise_constant_distribution instead of ad-hoc binary search.

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 11:55:52 PST 2016


kcc added inline comments.

================
Comment at: lib/Fuzzer/FuzzerInternal.h:287
@@ -282,1 +286,3 @@
 
+  std::mt19937 Generator;
+  std::piecewise_constant_distribution<double> CorpusDistribution;
----------------
krasin wrote:
> kcc wrote:
> > We should not be using yet another random generator, we already have one. 
> > Please use it. (USF.GetRand())
> USF.GetRand does not meet the requirements for UniformRandomNumberGenerator: http://en.cppreference.com/w/cpp/concept/UniformRandomNumberGenerator and that is needed to use std::piecewise_constant_distribution.
> 
> Should I change USF.GetRand definition to be more standard-compliant?
Can you *extend* it to be more standard-compliant?


http://reviews.llvm.org/D16419





More information about the llvm-commits mailing list