Код: Выделить всё
// Timing function
template
double measure_execution_time(F func) {
auto start = std::chrono::steady_clock::now();
func();
auto end = std::chrono::steady_clock::now();
return std::chrono::duration(end - start).count();
}
Код: Выделить всё
int main() {
const int ntrial = 3; // Number of trials
std::ofstream outfile("performance_data.txt");
for (int n = 2; n
Подробнее здесь: [url]https://stackoverflow.com/questions/78374127/get-error-in-the-parameter-when-i-call-a-function-error-expected-expression[/url]