| 55 | } |
| 56 | |
| 57 | bool isCudaAvailable( int* driverVersionOut, int* runtimeVersionOut, int* computeMajorOut, int* computeMinorOut ) |
| 58 | { |
| 59 | auto info = MR::Cuda::getDeviceInfo(); |
| 60 | if ( !info ) |
| 61 | return false; |
| 62 | |
| 63 | if ( driverVersionOut ) |
| 64 | *driverVersionOut = info->driverVersion; |
| 65 | if ( runtimeVersionOut ) |
| 66 | *runtimeVersionOut = info->runtimeVersion; |
| 67 | if ( computeMajorOut ) |
| 68 | *computeMajorOut = info->computeMajor; |
| 69 | if ( computeMinorOut ) |
| 70 | *computeMinorOut = info->computeMinor; |
| 71 | |
| 72 | return info->fitForComputations(); |
| 73 | } |
| 74 | |
| 75 | size_t getCudaAvailableMemory() |
| 76 | { |
no test coverage detected