소스 검색

drop support for hwloc < 1.1, the cpuset_t type will disappear in the close future anyway

Samuel Thibault 13 년 전
부모
커밋
6a333adbb0
4개의 변경된 파일8개의 추가작업 그리고 20개의 파일을 삭제
  1. 1 7
      src/core/combined_workers.c
  2. 1 1
      src/core/perfmodel/perfmodel_bus.c
  3. 3 9
      src/core/topology.c
  4. 3 3
      src/core/workers.h

+ 1 - 7
src/core/combined_workers.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011  Université de Bordeaux 1
+ * Copyright (C) 2010-2012  Université de Bordeaux 1
  * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -29,12 +29,6 @@
 #include <windows.h>
 #endif
 
-#ifndef HWLOC_BITMAP_H
-/* hwloc <1.1 does not offer the bitmap API yet */
-#define hwloc_bitmap_alloc hwloc_cpuset_alloc
-#define hwloc_bitmap_or hwloc_cpuset_or
-#endif
-
 static int compar_int(const void *pa, const void *pb)
 {
 	int a = *((int *)pa);

+ 1 - 1
src/core/perfmodel/perfmodel_bus.c

@@ -529,7 +529,7 @@ static void benchmark_all_gpu_devices(void)
 #endif
 
 #ifdef STARPU_HAVE_HWLOC
-	hwloc_cpuset_t former_cpuset = hwloc_bitmap_alloc();
+	hwloc_bitmap_t former_cpuset = hwloc_bitmap_alloc();
 	hwloc_get_cpubind(hwtopology, former_cpuset, HWLOC_CPUBIND_THREAD);
 #elif __linux__
 	/* Save the current cpu binding */

+ 3 - 9
src/core/topology.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010-2012  Université de Bordeaux 1
+ * Copyright (C) 2009-2012  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -35,12 +35,6 @@
 #ifdef STARPU_HAVE_WINDOWS
 #include <windows.h>
 #endif
-#ifndef HWLOC_BITMAP_H
-/* hwloc <1.1 does not offer the bitmap API yet */
-#define hwloc_bitmap_alloc hwloc_cpuset_alloc
-#define hwloc_bitmap_only hwloc_cpuset_cpu
-#define hwloc_bitmap_singlify hwloc_cpuset_singlify
-#endif
 
 static unsigned topology_is_initialized = 0;
 
@@ -649,7 +643,7 @@ void _starpu_bind_thread_on_cpu(struct _starpu_machine_config *config STARPU_ATT
 	if (support->cpubind->set_thisthread_cpubind)
 	{
 		hwloc_obj_t obj = hwloc_get_obj_by_depth(config->topology.hwtopology, config->cpu_depth, cpuid);
-		hwloc_cpuset_t set = obj->cpuset;
+		hwloc_bitmap_t set = obj->cpuset;
 		int ret;
 
 		hwloc_bitmap_singlify(set);
@@ -700,7 +694,7 @@ void _starpu_bind_thread_on_cpus(struct _starpu_machine_config *config STARPU_AT
 	support = hwloc_topology_get_support(config->topology.hwtopology);
 	if (support->cpubind->set_thisthread_cpubind)
 	{
-		hwloc_cpuset_t set = combined_worker->hwloc_cpu_set;
+		hwloc_bitmap_t set = combined_worker->hwloc_cpu_set;
 		int ret;
 
 		ret = hwloc_set_cpubind(config->topology.hwtopology, set, HWLOC_CPUBIND_THREAD);

+ 3 - 3
src/core/workers.h

@@ -87,8 +87,8 @@ struct _starpu_worker
 	cpu_set_t current_cpu_set;
 #endif /* __GLIBC__ */
 #ifdef STARPU_HAVE_HWLOC
-	hwloc_cpuset_t initial_hwloc_cpu_set;
-	hwloc_cpuset_t current_hwloc_cpu_set;
+	hwloc_bitmap_t initial_hwloc_cpu_set;
+	hwloc_bitmap_t current_hwloc_cpu_set;
 #endif
 };
 
@@ -104,7 +104,7 @@ struct _starpu_combined_worker
 	cpu_set_t cpu_set;
 #endif /* __GLIBC__ */
 #ifdef STARPU_HAVE_HWLOC
-	hwloc_cpuset_t hwloc_cpu_set;
+	hwloc_bitmap_t hwloc_cpu_set;
 #endif
 };