From 8efba58a3b656e9b41fb0471ae6453425a61c520 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 7 Aug 2019 15:25:26 -0700 Subject: Export of internal Abseil changes -- 38bc0644e17bf9fe4d78d3db92cd06f585b99ba7 by Andy Soffer : Change benchmark to be cc_binary instead of cc_test, and fix a bug in the zipf_distribution benchmark in which arguments were passed in the wrong order. PiperOrigin-RevId: 262227159 -- 3b5411d8f285a758a1713f7ef0dbfa3518f2b38b by CJ Johnson : Updates Simple<*>() overload to match the name schema of the others PiperOrigin-RevId: 262211217 -- 0cb6812cb8b6e3bf0386b9354189ffcf46c4c094 by Andy Soffer : Removing period in trailing namespace comments. PiperOrigin-RevId: 262210952 -- c903feae3a881be81adf37e9fccd558ee3ed1e64 by CJ Johnson : This is a cleanup on the public header of InlinedVector to be more presentable PiperOrigin-RevId: 262207691 -- 9a94384dc79cdcf38f6153894f337ebb744e2d76 by Tom Manshreck : Fix incorrect doc on operator()[] for flat_hash_set PiperOrigin-RevId: 262206962 -- 17e88ee10b727af82c04f8150b6d246eaac836cb by Derek Mauro : Fix gcc-5 build error PiperOrigin-RevId: 262198236 GitOrigin-RevId: 38bc0644e17bf9fe4d78d3db92cd06f585b99ba7 Change-Id: I77cababa47ba3ee8b6cebb2c2cfc9f60a331f6b7 --- absl/random/benchmarks.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'absl/random/benchmarks.cc') diff --git a/absl/random/benchmarks.cc b/absl/random/benchmarks.cc index 265d54d7..87bbb981 100644 --- a/absl/random/benchmarks.cc +++ b/absl/random/benchmarks.cc @@ -25,7 +25,6 @@ #include #include -#include "benchmark/benchmark.h" #include "absl/base/macros.h" #include "absl/meta/type_traits.h" #include "absl/random/bernoulli_distribution.h" @@ -40,6 +39,7 @@ #include "absl/random/uniform_int_distribution.h" #include "absl/random/uniform_real_distribution.h" #include "absl/random/zipf_distribution.h" +#include "benchmark/benchmark.h" namespace { @@ -221,12 +221,12 @@ void BM_Poisson(benchmark::State& state) { BM_Dist(state, a); } -template +template void BM_Zipf(benchmark::State& state) { using value_type = typename Dist::result_type; - volatile double v = V; volatile double q = Q; - BM_Dist(state, std::numeric_limits::max(), v, q); + volatile double v = V; + BM_Dist(state, std::numeric_limits::max(), q, v); } template @@ -333,8 +333,8 @@ void BM_Thread(benchmark::State& state) { absl::log_uniform_int_distribution); \ BENCHMARK_TEMPLATE(BM_Dist, Engine, std::geometric_distribution); \ BENCHMARK_TEMPLATE(BM_Zipf, Engine, absl::zipf_distribution); \ - BENCHMARK_TEMPLATE(BM_Zipf, Engine, absl::zipf_distribution, 3, \ - 2); \ + BENCHMARK_TEMPLATE(BM_Zipf, Engine, absl::zipf_distribution, 2, \ + 3); \ BENCHMARK_TEMPLATE(BM_Bernoulli, Engine, std::bernoulli_distribution, \ 257305); \ BENCHMARK_TEMPLATE(BM_Bernoulli, Engine, absl::bernoulli_distribution, \ -- cgit v1.2.3