Lines Matching full:engine
59 // random engine to speed initialization in the benchmarks.
97 template <typename Engine, typename SSeq = DefaultConstructorSeedSeq>
98 Engine make_engine() { in make_engine()
102 return Engine(); in make_engine()
106 return Engine(seq); in make_engine()
110 template <typename Engine, typename SSeq>
113 auto rng = make_engine<Engine, SSeq>(); in BM_Construct()
118 template <typename Engine>
120 using value_type = typename Engine::result_type; in BM_Direct()
122 auto rng = make_engine<Engine>(); in BM_Direct()
129 template <typename Engine>
133 using value_type = typename Engine::result_type; in BM_Generate()
135 auto rng = make_engine<Engine>(); in BM_Generate()
141 template <typename Engine, size_t elems>
143 // Direct use of the Engine. in BM_Shuffle()
146 auto rng = make_engine<Engine>(); in BM_Shuffle()
151 template <typename Engine, size_t elems>
153 // Direct use of the Engine. in BM_ShuffleReuse()
155 auto rng = make_engine<Engine>(); in BM_ShuffleReuse()
161 template <typename Engine, typename Dist, typename... Args>
164 auto rng = make_engine<Engine>(); in BM_Dist()
173 template <typename Engine, typename Dist>
178 BM_Dist<Engine, Dist>(state, kMin, kMax); in BM_Large()
181 template <typename Engine, typename Dist>
186 BM_Dist<Engine, Dist>(state, kMin, kMax); in BM_Small()
189 template <typename Engine, typename Dist, int A>
192 BM_Dist<Engine, Dist>(state, a); in BM_Bernoulli()
195 template <typename Engine, typename Dist, int A, int B>
200 BM_Dist<Engine, Dist>(state, a, b); in BM_Beta()
203 template <typename Engine, typename Dist, int A>
207 BM_Dist<Engine, Dist>(state, a); in BM_Gamma()
210 template <typename Engine, typename Dist, int A = 100>
213 BM_Dist<Engine, Dist>(state, a); in BM_Poisson()
216 template <typename Engine, typename Dist, int Q = 2, int V = 1>
221 BM_Dist<Engine, Dist>(state, std::numeric_limits<value_type>::max(), q, v); in BM_Zipf()
224 template <typename Engine, typename Dist>
227 auto rng = make_engine<Engine>(); in BM_Thread()
242 #define BM_BASIC(Engine) \ argument
243 BENCHMARK_TEMPLATE(BM_Construct, Engine, DefaultConstructorSeedSeq); \
244 BENCHMARK_TEMPLATE(BM_Construct, Engine, PrecompiledSeedSeq); \
245 BENCHMARK_TEMPLATE(BM_Construct, Engine, std::seed_seq); \
246 BENCHMARK_TEMPLATE(BM_Direct, Engine); \
247 BENCHMARK_TEMPLATE(BM_Shuffle, Engine, 10); \
248 BENCHMARK_TEMPLATE(BM_Shuffle, Engine, 100); \
249 BENCHMARK_TEMPLATE(BM_Shuffle, Engine, 1000); \
250 BENCHMARK_TEMPLATE(BM_ShuffleReuse, Engine, 100); \
251 BENCHMARK_TEMPLATE(BM_ShuffleReuse, Engine, 1000); \
252 BENCHMARK_TEMPLATE(BM_Dist, Engine, \
254 BENCHMARK_TEMPLATE(BM_Dist, Engine, \
256 BENCHMARK_TEMPLATE(BM_Dist, Engine, std::uniform_int_distribution<int32_t>); \
257 BENCHMARK_TEMPLATE(BM_Dist, Engine, std::uniform_int_distribution<int64_t>); \
258 BENCHMARK_TEMPLATE(BM_Dist, Engine, \
260 BENCHMARK_TEMPLATE(BM_Dist, Engine, \
262 BENCHMARK_TEMPLATE(BM_Large, Engine, \
264 BENCHMARK_TEMPLATE(BM_Large, Engine, \
266 BENCHMARK_TEMPLATE(BM_Large, Engine, \
268 BENCHMARK_TEMPLATE(BM_Large, Engine, \
270 BENCHMARK_TEMPLATE(BM_Dist, Engine, std::uniform_real_distribution<float>); \
271 BENCHMARK_TEMPLATE(BM_Dist, Engine, std::uniform_real_distribution<double>); \
272 BENCHMARK_TEMPLATE(BM_Dist, Engine, absl::uniform_real_distribution<float>); \
273 BENCHMARK_TEMPLATE(BM_Dist, Engine, absl::uniform_real_distribution<double>)
275 #define BM_COPY(Engine) BENCHMARK_TEMPLATE(BM_Generate, Engine) argument
277 #define BM_THREAD(Engine) \ argument
278 BENCHMARK_TEMPLATE(BM_Thread, Engine, \
281 BENCHMARK_TEMPLATE(BM_Thread, Engine, \
284 BENCHMARK_TEMPLATE(BM_Shuffle, Engine, 100)->ThreadPerCpu(); \
285 BENCHMARK_TEMPLATE(BM_Shuffle, Engine, 1000)->ThreadPerCpu(); \
286 BENCHMARK_TEMPLATE(BM_ShuffleReuse, Engine, 100)->ThreadPerCpu(); \
287 BENCHMARK_TEMPLATE(BM_ShuffleReuse, Engine, 1000)->ThreadPerCpu()
289 #define BM_EXTENDED(Engine) \ argument
291 BENCHMARK_TEMPLATE(BM_Small, Engine, \
293 BENCHMARK_TEMPLATE(BM_Small, Engine, \
295 BENCHMARK_TEMPLATE(BM_Small, Engine, \
297 BENCHMARK_TEMPLATE(BM_Small, Engine, \
299 BENCHMARK_TEMPLATE(BM_Small, Engine, std::uniform_real_distribution<float>); \
300 BENCHMARK_TEMPLATE(BM_Small, Engine, \
302 BENCHMARK_TEMPLATE(BM_Small, Engine, \
304 BENCHMARK_TEMPLATE(BM_Small, Engine, \
307 BENCHMARK_TEMPLATE(BM_Dist, Engine, std::normal_distribution<double>); \
308 BENCHMARK_TEMPLATE(BM_Dist, Engine, absl::gaussian_distribution<double>); \
309 BENCHMARK_TEMPLATE(BM_Dist, Engine, std::exponential_distribution<double>); \
310 BENCHMARK_TEMPLATE(BM_Dist, Engine, absl::exponential_distribution<double>); \
311 BENCHMARK_TEMPLATE(BM_Poisson, Engine, std::poisson_distribution<int64_t>, \
313 BENCHMARK_TEMPLATE(BM_Poisson, Engine, absl::poisson_distribution<int64_t>, \
315 BENCHMARK_TEMPLATE(BM_Poisson, Engine, std::poisson_distribution<int64_t>, \
317 BENCHMARK_TEMPLATE(BM_Poisson, Engine, absl::poisson_distribution<int64_t>, \
319 BENCHMARK_TEMPLATE(BM_Poisson, Engine, std::poisson_distribution<int64_t>, \
321 BENCHMARK_TEMPLATE(BM_Poisson, Engine, absl::poisson_distribution<int64_t>, \
323 BENCHMARK_TEMPLATE(BM_Dist, Engine, \
325 BENCHMARK_TEMPLATE(BM_Dist, Engine, \
327 BENCHMARK_TEMPLATE(BM_Dist, Engine, std::geometric_distribution<int64_t>); \
328 BENCHMARK_TEMPLATE(BM_Zipf, Engine, absl::zipf_distribution<uint64_t>); \
329 BENCHMARK_TEMPLATE(BM_Zipf, Engine, absl::zipf_distribution<uint64_t>, 2, \
331 BENCHMARK_TEMPLATE(BM_Bernoulli, Engine, std::bernoulli_distribution, \
333 BENCHMARK_TEMPLATE(BM_Bernoulli, Engine, absl::bernoulli_distribution, \
335 BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<double>, 65, \
337 BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<double>, 99, \
339 BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<double>, 150, \
341 BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<double>, 410, \
343 BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<float>, 65, 41); \
344 BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<float>, 99, \
346 BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<float>, 150, \
348 BENCHMARK_TEMPLATE(BM_Beta, Engine, absl::beta_distribution<float>, 410, \
350 BENCHMARK_TEMPLATE(BM_Gamma, Engine, std::gamma_distribution<float>, 199); \
351 BENCHMARK_TEMPLATE(BM_Gamma, Engine, std::gamma_distribution<double>, 199)