-static void bench_parmap_full(int nthreads, e_xbt_parmap_mode_t mode)
-{
- XBT_INFO("** mode = %s", parmap_mode_name(mode).c_str());
-
- if (parmap_skip_mode(mode)) {
- XBT_INFO(" not available");
- return;
- }
-
- std::vector<unsigned> a(ARRAY_SIZE);
- std::vector<unsigned*> data(ARRAY_SIZE);
- std::iota(begin(a), end(a), 0);
- std::iota(begin(data), end(data), &a[0]);
-
- int i = 0;
- double start_time = xbt_os_time();
- double elapsed_time;
- do {
- {
- simgrid::xbt::Parmap<unsigned*> parmap(nthreads, mode);
- parmap.apply(fun_to_apply, data);
- } // enclosing block to ensure that the parmap is destroyed here.
- elapsed_time = xbt_os_time() - start_time;
- i++;
- } while (elapsed_time < TIMEOUT);
-
- XBT_INFO(" ran %d times in %g seconds (%g/s)", i, elapsed_time, i / elapsed_time);
-}
-
-static void bench_parmap_apply(int nthreads, e_xbt_parmap_mode_t mode)