瀏覽代碼

src/core/perfmodel/perfmodel_bus.c: only display header when some cuda or opencl devices are available

Nathalie Furmento 13 年之前
父節點
當前提交
41b76f990d
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/core/perfmodel/perfmodel_bus.c

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

@@ -1133,7 +1133,8 @@ void starpu_bus_print_bandwidth(FILE *f)
 	}
 
 #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");
+	if (ncuda != 0 || nopencl != 0)
+		fprintf(f, "\nGPU\tCPU in preference order (logical index), host-to-device, device-to-host\n");
 	for (src = 1; src <= maxnode; src++)
 	{
 		struct dev_timing *timing;