Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
couple of minor smells
[simgrid.git] / teshsuite / xbt / parmap_bench / parmap_bench.c
index f28a54f..16505df 100644 (file)
@@ -45,15 +45,13 @@ static const char *parmap_mode_name(e_xbt_parmap_mode_t mode)
 
 static int parmap_skip_mode(e_xbt_parmap_mode_t mode)
 {
-  switch (mode) {
 #if !HAVE_FUTEX_H
-  case XBT_PARMAP_FUTEX:
+  if (mode == XBT_PARMAP_FUTEX) {
     printf("not available\n");
     return 1;
+  } else
 #endif
-  default:
     return 0;
-  }
 }
 
 static unsigned fibonacci(unsigned n)
@@ -183,7 +181,7 @@ int main(int argc, char *argv[])
 
   printf("Parmap benchmark with %d workers (modes = %#x)...\n\n", nthreads, modes);
 
-  fun_to_apply = fun_small_comp;
+  fun_to_apply = &fun_small_comp;
 
   printf("Benchmark for parmap create+apply+destroy (small comp):\n");
   bench_all_modes(bench_parmap_full, nthreads, modes);
@@ -193,7 +191,7 @@ int main(int argc, char *argv[])
   bench_all_modes(bench_parmap_apply, nthreads, modes);
   printf("\n");
 
-  fun_to_apply = fun_big_comp;
+  fun_to_apply = &fun_big_comp;
 
   printf("Benchmark for parmap create+apply+destroy (big comp):\n");
   bench_all_modes(bench_parmap_full, nthreads, modes);