Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cudaDeviceProp prop;
- int count;
- cudaGetDeviceCount(&count);
- cout << "Number of CUDA devices on this system: "
- << count << endl;
- for (int i = 0; i < count; i++) {
- cudaGetDeviceProperties(&prop, i);
- cout << "\n General Information for device " << i << endl;
- cudaGetDeviceProperties(&prop, i);
- cout << "\n--- General Information for device " << i << endl;
- cout << "Name: " << prop.name << endl;
- cout << "Clock rate: " << prop.clockRate / 1000<< "MHZ" << endl;
- cout << "Total global mem: " << prop.totalGlobalMem / 1024 / 1024 << "MB" << endl;
- cout << "Total constant Mem: " << prop.totalConstMem / 1024 << "KB" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement