瀏覽代碼

openmp: implement starpu_omp_get_num_places()

The omp_get_num_places routine returns the number of places available to
the execution environment in the place list. This value is equivalent to
the number of places in the place-partition-var ICV in the execution
environment of the initial task.
Samuel Pitoiset 9 年之前
父節點
當前提交
1d0ce6f7dc
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/util/openmp_runtime_support_omp_api.c

+ 2 - 2
src/util/openmp_runtime_support_omp_api.c

@@ -218,8 +218,8 @@ enum starpu_omp_proc_bind_value starpu_omp_get_proc_bind(void)
 
 int starpu_omp_get_num_places(void)
 {
-  /* TODO */
-  return 0;
+	struct starpu_omp_place *places = &_starpu_omp_initial_icv_values->places;
+	return places->nb_numeric_places;
 }
 
 int starpu_omp_get_place_num_procs(int place_num)