6#ifndef CHEBYSHEV_BENCHMARK_STRUCTURES_H
7#define CHEBYSHEV_BENCHMARK_STRUCTURES_H
12#include "../core/common.h"
26 std::string
name =
"unknown";
64 template<
typename InputType>
70 template<
typename InputType =
double>
#define CHEBYSHEV_BENCHMARK_ITER
Default number of benchmark iterations.
Definition common.h:22
#define CHEBYSHEV_BENCHMARK_RUNS
Default number of benchmark runs.
Definition common.h:27
Input generators for benchmarks.
auto uniform1D(long double a, long double b)
Uniform generator over a domain.
Definition generator.h:26
std::function< InputType(random::random_source &)> InputGenerator
A function which takes in a random source and returns a generated input element.
Definition benchmark_structures.h:65
General namespace of the framework.
Definition benchmark.h:22
constexpr FloatType get_nan()
Get a quiet NaN of the specified floating point type.
Definition common.h:65
A structure holding the options of a benchmark.
Definition benchmark_structures.h:71
benchmark_options(unsigned int runs, unsigned int iterations, bool quiet=false)
Construct benchmark options from the number of runs and iterations and whether to print the case to o...
Definition benchmark_structures.h:95
unsigned int iterations
Number of iterations.
Definition benchmark_structures.h:77
uint64_t seed
The seed to use for randomized input generation (by default, a random seed is generated using the ran...
Definition benchmark_structures.h:87
bool quiet
Whether to print to standard output or not.
Definition benchmark_structures.h:83
benchmark_options()
Default constructor for benchmark options.
Definition benchmark_structures.h:91
unsigned int runs
Number of runs (run with the same input values).
Definition benchmark_structures.h:74
InputGenerator< InputType > inputGenerator
The function to use to generate input for the benchmark.
Definition benchmark_structures.h:80
benchmark_options(unsigned int runs, unsigned int iterations, InputGenerator< InputType > gen, bool quiet=false)
Construct benchmark options from the number of runs and iterations, the input generator to use and wh...
Definition benchmark_structures.h:100
Structure holding the results of a benchmark.
Definition benchmark_structures.h:23
bool quiet
Whether to print to standard output or not.
Definition benchmark_structures.h:54
long double averageRuntime
Estimated average runtime.
Definition benchmark_structures.h:38
bool failed
Whether the benchmark failed because an exception was thrown.
Definition benchmark_structures.h:51
unsigned int runs
Number of runs.
Definition benchmark_structures.h:29
unsigned int iterations
Number of iterations.
Definition benchmark_structures.h:32
long double runsPerSecond
Number of runs per second.
Definition benchmark_structures.h:44
long double totalRuntime
Total runtime over all runs and iterations.
Definition benchmark_structures.h:35
uint64_t seed
The seed used for randomized input generation.
Definition benchmark_structures.h:47
std::string name
Identifying name of the function or test case.
Definition benchmark_structures.h:26
std::map< std::string, long double > additionalFields
Additional fields in floating point representation.
Definition benchmark_structures.h:57
long double stdevRuntime
Sample standard deviation of the runtime.
Definition benchmark_structures.h:41
A source of pseudorandom numbers.
Definition random.h:39