| 
      
      
        
          | 
   16 #ifndef HWLOC_CUDART_H    17 #define HWLOC_CUDART_H    20 #include <hwloc/autogen/config.h>    21 #include <hwloc/linux.h>    22 #include <hwloc/helper.h>    24 #include <cuda_runtime_api.h>    40                                int device, int  *domain, int  *bus, int  *dev)    43   struct cudaDeviceProp prop;    45   cerr = cudaGetDeviceProperties(&prop, device);    51 #if CUDART_VERSION >= 4000    52   *domain = prop.pciDomainID;    58   *dev = prop.pciDeviceID;    77 #ifdef HWLOC_LINUX_SYS    79 #define HWLOC_CUDART_DEVICE_SYSFS_PATH_MAX 128    80   char path[HWLOC_CUDART_DEVICE_SYSFS_PATH_MAX];    92   sprintf(path, "/sys/bus/pci/devices/%04x:%02x:%02x.0/local_cpus" , domain, bus, dev);    93   sysfile = fopen(path, "r" );   120   int domain, bus, dev; |  |