Przeglądaj źródła

Fix build without hwloc

Samuel Thibault 8 lat temu
rodzic
commit
0ec213539c
2 zmienionych plików z 4 dodań i 0 usunięć
  1. 2 0
      src/core/topology.c
  2. 2 0
      src/core/topology.h

+ 2 - 0
src/core/topology.c

@@ -800,6 +800,7 @@ _starpu_topology_get_nhwpu (struct _starpu_machine_config *config)
 	return config->topology.nhwpus;
 }
 
+#ifdef STARPU_HAVE_HWLOC
 void _starpu_topology_filter(hwloc_topology_t topology)
 {
 #if HWLOC_API_VERSION >= 0x20000
@@ -808,6 +809,7 @@ void _starpu_topology_filter(hwloc_topology_t topology)
 	hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES | HWLOC_TOPOLOGY_FLAG_IO_BRIDGES);
 #endif
 }
+#endif
 
 #ifdef STARPU_USE_MIC
 static void

+ 2 - 0
src/core/topology.h

@@ -51,8 +51,10 @@ unsigned _starpu_topology_get_nhwcpu(struct _starpu_machine_config *config);
 /* returns the number of logical cpus */
 unsigned _starpu_topology_get_nhwpu(struct _starpu_machine_config *config);
 
+#ifdef STARPU_HAVE_HWLOC
 /* Small convenient function to filter hwloc topology depending on HWLOC API version */
 void _starpu_topology_filter(hwloc_topology_t topology);
+#endif
 
 #define STARPU_NOWORKERID -1
 /* Bind the current thread on the CPU logically identified by "cpuid". The