#include "for_each.hpp" #include void reduce_sum( const std::string& model, const unsigned num_threads, const unsigned num_rounds ) { std::cout << std::setw(12) << "size" << std::setw(12) << "runtime" << std::endl; for(size_t N=10; N<=100000000; N = N*10) { vec.resize(N); double runtime {0.0}; for(unsigned j=0; jcheck([] (const std::string& m) { if(m != "tbb" && m != "tf" && m != "omp") { return "model name should be \"tbb\", \"omp\", or \"tf\""; } return ""; }); CLI11_PARSE(app, argc, argv); std::cout << "model=" << model << ' ' << "num_threads=" << num_threads << ' ' << "num_rounds=" << num_rounds << ' ' << std::endl; reduce_sum(model, num_threads, num_rounds); return 0; }