浏览代码

fix compilation warning

Samuel Thibault 13 年之前
父节点
当前提交
1d7dcdc5b6
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/core/perfmodel/perfmodel_bus.c

+ 4 - 0
src/core/perfmodel/perfmodel_bus.c

@@ -792,8 +792,10 @@ int *_starpu_get_opencl_affinity_vector(unsigned gpuid)
 
 void starpu_bus_print_affinity(FILE *f)
 {
+#if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
 	unsigned cpu;
 	int gpu;
+#endif
 
 	fprintf(f, "# GPU\tCPU in preference order (logical index)\n");
 
@@ -1130,6 +1132,7 @@ void starpu_bus_print_bandwidth(FILE *f)
 		fprintf(f, "\n");
 	}
 
+#if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
 	fprintf(f, "\nGPU\tCPU in preference order (logical index), host-to-device, device-to-host\n");
 	for (src = 1; src <= maxnode; src++)
 	{
@@ -1170,6 +1173,7 @@ void starpu_bus_print_bandwidth(FILE *f)
 #endif
 		fprintf(f, "\n");
 	}
+#endif
 }
 
 static void generate_bus_bandwidth_file(void)