浏览代码

pciDomainID is only available from cuda 4.0

Samuel Thibault 13 年之前
父节点
当前提交
9d282139b2
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/drivers/cuda/driver_cuda.c

+ 2 - 0
src/drivers/cuda/driver_cuda.c

@@ -273,9 +273,11 @@ void *_starpu_cuda_worker(void *arg)
 	float size = (float) prop.totalGlobalMem / (1<<30);
 
 #if CUDA_VERSION >= 3020
+#if CUDA_VERSION >= 4000
 	if (prop.pciDomainID)
 		snprintf(args->name, sizeof(args->name), "CUDA %d (%s %.1f GiB %04x:%02x:%02x.0)", args->devid, devname, size, prop.pciDomainID, prop.pciBusID, prop.pciDeviceID);
 	else
+#endif
 		snprintf(args->name, sizeof(args->name), "CUDA %d (%s %.1f GiB %02x:%02x.0)", args->devid, devname, size, prop.pciBusID, prop.pciDeviceID);
 #else
 	snprintf(args->name, sizeof(args->name), "CUDA %d (%s %.1f GiB)", args->devid, devname, size);