mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-04-28 02:31:14 +00:00
Formatting updates.
This commit is contained in:
@@ -20,13 +20,13 @@
|
||||
#include <nvbench/stopping_criterion.cuh>
|
||||
#include <nvbench/types.cuh>
|
||||
|
||||
#include "test_asserts.cuh"
|
||||
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <random>
|
||||
#include <vector>
|
||||
|
||||
#include "test_asserts.cuh"
|
||||
|
||||
void test_const()
|
||||
{
|
||||
nvbench::criterion_params params;
|
||||
@@ -46,14 +46,14 @@ std::vector<double> generate(double mean, double rel_std_dev, int size)
|
||||
std::mt19937 gen(seed++);
|
||||
std::vector<nvbench::float64_t> v(static_cast<std::size_t>(size));
|
||||
std::normal_distribution<nvbench::float64_t> dist(mean, mean * rel_std_dev);
|
||||
std::generate(v.begin(), v.end(), [&]{ return dist(gen); });
|
||||
std::generate(v.begin(), v.end(), [&] { return dist(gen); });
|
||||
return v;
|
||||
}
|
||||
|
||||
void test_stdrel()
|
||||
{
|
||||
const nvbench::int64_t size = 10;
|
||||
const nvbench::float64_t mean = 42.0;
|
||||
const nvbench::int64_t size = 10;
|
||||
const nvbench::float64_t mean = 42.0;
|
||||
const nvbench::float64_t max_noise = 0.1;
|
||||
|
||||
nvbench::criterion_params params;
|
||||
@@ -62,7 +62,7 @@ void test_stdrel()
|
||||
nvbench::detail::stdrel_criterion criterion;
|
||||
criterion.initialize(params);
|
||||
|
||||
for (nvbench::float64_t measurement: generate(mean, max_noise / 2, size))
|
||||
for (nvbench::float64_t measurement : generate(mean, max_noise / 2, size))
|
||||
{
|
||||
criterion.add_measurement(measurement);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ void test_stdrel()
|
||||
params.set_float64("max-noise", max_noise);
|
||||
criterion.initialize(params);
|
||||
|
||||
for (nvbench::float64_t measurement: generate(mean, max_noise * 2, size))
|
||||
for (nvbench::float64_t measurement : generate(mean, max_noise * 2, size))
|
||||
{
|
||||
criterion.add_measurement(measurement);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user