From 8212e9e919dd53006567c2404f064257c4fd9d2c Mon Sep 17 00:00:00 2001 From: IRainman Date: Tue, 8 Apr 2025 01:14:45 +0300 Subject: [PATCH] fix warnings in the benchmark. --- benchmarks/benchmark.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/benchmark.cpp b/benchmarks/benchmark.cpp index a493cfb..0d045bd 100644 --- a/benchmarks/benchmark.cpp +++ b/benchmarks/benchmark.cpp @@ -61,7 +61,7 @@ time_it_ns(std::vector> &lines, T const &function, return aggregate; } -void pretty_print(double volume, size_t number_of_floats, std::string name, +void pretty_print(size_t volume, size_t number_of_floats, std::string name, std::vector events) { double volumeMB = volume / (1024. * 1024.); double average_ns{0}; @@ -137,8 +137,8 @@ time_it_ns(std::vector> &lines, T const &function, printed_bug = true; } t2 = std::chrono::high_resolution_clock::now(); - double dif = - std::chrono::duration_cast(t2 - t1).count(); + double const dif = static_cast( + std::chrono::duration_cast(t2 - t1).count()); average += dif; min_value = min_value < dif ? min_value : dif; } @@ -146,7 +146,7 @@ time_it_ns(std::vector> &lines, T const &function, return std::make_pair(min_value, average); } -void pretty_print(double volume, size_t number_of_floats, std::string const &name, +void pretty_print(size_t volume, size_t number_of_floats, std::string const &name, std::pair result) { double volumeMB = volume / (1024. * 1024.); printf("%-40s: %8.2f MB/s (+/- %.1f %%) ", name.data(),