28const std::vector<size_t>
n_samples_vector = {10'000, 50'000, 100'000, 500'000, 1'000'000};
49void saveResults(
const std::string &filename,
const std::vector<results> &
results,
const std::string &function_expr) {
50 std::ofstream outfile;
51 outfile.open(filename);
53 if (!outfile.is_open()) {
54 std::cerr <<
"Error: Unable to create results file " << filename << std::endl;
59 outfile <<
"Function: " << function_expr <<
"\n";
60 outfile <<
"Number of points\tIntegration Result\tDuration (ms)\n";
62 for (
const auto &result :
results) {
63 outfile << result.n_samples <<
"\t"
64 << result.integration_result <<
"\t"
65 << result.duration <<
"\n";
void saveResults(const std::string &filename, const std::vector< results > &results, const std::string &function_expr)
Export benchmark results to CSV file for analysis.
const std::vector< size_t > n_samples_vector
Global sample count vector used across all benchmarks for convergence testing.
unsigned int n_threads
Global OpenMP thread count (set at runtime)
Benchmarking framework for Monte Carlo integration algorithms.
Stores benchmark result for a single sample count.