瀏覽代碼

Fix the _starpu_cpu_discover_devices() functions that are used when hwloc is not installed.

Cyril Roelandt 12 年之前
父節點
當前提交
6e9d0380d5
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/drivers/cpu/driver_cpu.c

+ 6 - 6
src/drivers/cpu/driver_cpu.c

@@ -72,30 +72,30 @@ _starpu_cpu_discover_devices(struct _starpu_machine_config *config)
 
 #elif defined(HAVE_SYSCONF)
 void
-_starpu_cpu_discover_cpus(struct _starpu_machine_config *config)
+_starpu_cpu_discover_devices(struct _starpu_machine_config *config)
 {
 	/* Discover the CPUs relying on the sysconf(3) function and fills
 	 * CONFIG accordingly. */
 
-	config->topology->nhwcpus = sysconf(_SC_NPROCESSORS_ONLN);
+	config->topology.nhwcpus = sysconf(_SC_NPROCESSORS_ONLN);
 }
 
 #elif defined(__MINGW32__) || defined(__CYGWIN__)
 void
-_starpu_cpu_discover_cpus(struct _starpu_machine_config *config)
+_starpu_cpu_discover_devices(struct _starpu_machine_config *config)
 {
 	/* Discover the CPUs on Cygwin and MinGW systems. */
 
 	SYSTEM_INFO sysinfo;
 	GetSystemInfo(&sysinfo);
-	config->topology->nhwcpus += sysinfo.dwNumberOfProcessors;
+	config->topology.nhwcpus = sysinfo.dwNumberOfProcessors;
 }
 #else
 #warning no way to know number of cores, assuming 1
 void
-_starpu_cpu_discover_cpus(struct _starpu_machine_config *config)
+_starpu_cpu_discover_devices(struct _starpu_machine_config *config)
 {
-	config->topology->nhwcpus = 1;
+	config->topology.nhwcpus = 1;
 }
 #endif