int parallel_tests() { size_t n = 10000000; std::vector<double> v(n); int num_failed = 0; num_failed += test_speed(v); num_failed += test_correctness(v); num_failed += test_threadpool(); return num_failed; }
int parallel_tests() { size_t n = 10000000; std::vector<double> v(n); int num_failed = 0; // if we only get one thread on this machine, skip the speed test if (std::thread::hardware_concurrency() > 1) num_failed += test_speed(v); num_failed += test_correctness(v); num_failed += test_threadpool(); return num_failed; }