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];  
   87   sprintf(path,  "/sys/bus/pci/devices/%04x:%02x:%02x.0/local_cpus", domain, bus, dev);  
   88   sysfile = fopen(path,  "r");  
  115   int domain, bus, dev;  
  
	  
	   | 
         
       
           |