[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 16:31:16 PST 2016


kcc added inline comments.

================
Comment at: lib/Fuzzer/FuzzerLoop.cpp:507
@@ +506,3 @@
+void Fuzzer::UpdateCorpusDistribution() {
+  size_t N = Corpus.size();
+  std::vector<double> Intervals(N+1);
----------------
a loop like 
  for (size_t i = 0; i < Corpus.size(); i++)  x[i] = i + 1
can be replaced with 
std::iota(x.begin(), x.end(),  1);


http://reviews.llvm.org/D16419





More information about the llvm-commits mailing list