From aa271104c104dfbe5b06e68313bdb3e26f444c1f Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 27 Jun 2015 06:42:54 +0000 Subject: [PATCH] nvml: add missing ifdef for vendors --- cuda.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cuda.cpp b/cuda.cpp index 3a8e435..4dc9885 100644 --- a/cuda.cpp +++ b/cuda.cpp @@ -75,14 +75,15 @@ void cuda_devicenames() free(device_name[i]); device_name[i] = NULL; } - - if (gpu_vendor(props.pciBusID, vendorname) > 0 && strlen(vendorname)) { +#ifdef USE_WRAPNVML + if (gpu_vendor((uint8_t)props.pciBusID, vendorname) > 0 && strlen(vendorname)) { device_name[i] = (char*) calloc(1, strlen(vendorname) + strlen(props.name) + 2); if (!strncmp(props.name, "GeForce ", 8)) sprintf(device_name[i], "%s %s", vendorname, &props.name[8]); else sprintf(device_name[i], "%s %s", vendorname, props.name); } else +#endif device_name[i] = strdup(props.name); } }