Check whether the first Cuda device is better than the second.
| 42 | |
| 43 | // Check whether the first Cuda device is better than the second. |
| 44 | bool CompareCudaDevice(const cudaDeviceProp& d1, const cudaDeviceProp& d2) { |
| 45 | bool result = (d1.major > d2.major) || |
| 46 | ((d1.major == d2.major) && (d1.minor > d2.minor)) || |
| 47 | ((d1.major == d2.major) && (d1.minor == d2.minor) && |
| 48 | (d1.multiProcessorCount > d2.multiProcessorCount)); |
| 49 | return result; |
| 50 | } |
| 51 | |
| 52 | } // namespace |
| 53 |
no outgoing calls
no test coverage detected