36 if (error != cudaSuccess)
45 struct cudaDeviceProp properties;
46 for (
int device = 0; device < num_devices; ++device)
51 if (properties.major == 9999)
61 properties.multiProcessorCount;
64 properties.maxThreadsPerMultiProcessor;
cudaError_t cudaGetDeviceCount(int *count)
Definition of CUDA's cudaGetDeviceCount function using dynamically loaded cudart library.
cudaError_t cudaGetDeviceProperties(cudaDeviceProp *prop, int device)
Definition of CUDA's cudaGetDeviceProperties function using dynamically loaded cudart library.
void query_device(DeviceProperties &device_properties)
Queries GPU device information, such as the number of devices, number of multiprocessors,...
Properties of GPU devices.
int * num_multiprocessors
int * num_threads_per_multiprocessor
void set_num_devices(int num_devices_)
Sets the number of devices and allocates memory for member data with the size of devices.