Browse Source

merge -r19818 from trunk

Corentin Salingue 8 years ago
parent
commit
2e72b7d5ab
2 changed files with 4 additions and 0 deletions
  1. 2 0
      src/core/topology.c
  2. 2 0
      src/core/topology.h

+ 2 - 0
src/core/topology.c

@@ -833,6 +833,7 @@ _starpu_topology_get_nhwpu (struct _starpu_machine_config *config)
 	return config->topology.nhwpus;
 	return config->topology.nhwpus;
 }
 }
 
 
+#ifdef STARPU_HAVE_HWLOC
 void _starpu_topology_filter(hwloc_topology_t topology)
 void _starpu_topology_filter(hwloc_topology_t topology)
 {
 {
 #if HWLOC_API_VERSION >= 0x20000
 #if HWLOC_API_VERSION >= 0x20000
@@ -841,6 +842,7 @@ void _starpu_topology_filter(hwloc_topology_t topology)
 	hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES | HWLOC_TOPOLOGY_FLAG_IO_BRIDGES);
 	hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES | HWLOC_TOPOLOGY_FLAG_IO_BRIDGES);
 #endif
 #endif
 }
 }
+#endif
 
 
 #ifdef STARPU_USE_MIC
 #ifdef STARPU_USE_MIC
 static void
 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 */
 /* returns the number of logical cpus */
 unsigned _starpu_topology_get_nhwpu(struct _starpu_machine_config *config);
 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 */
 /* Small convenient function to filter hwloc topology depending on HWLOC API version */
 void _starpu_topology_filter(hwloc_topology_t topology);
 void _starpu_topology_filter(hwloc_topology_t topology);
+#endif
 
 
 #define STARPU_NOWORKERID -1
 #define STARPU_NOWORKERID -1
 /* Bind the current thread on the CPU logically identified by "cpuid". The
 /* Bind the current thread on the CPU logically identified by "cpuid". The