| 150 | |
| 151 | |
| 152 | int gpu_getComputeCapability() { |
| 153 | #if COMPILE_CUDA |
| 154 | assert_gpuHasBeenBound(hasGpuBeenBound); |
| 155 | |
| 156 | cudaDeviceProp props; |
| 157 | CUDA_CHECK( cudaGetDeviceProperties(&props, getBoundGpuId()) ); |
| 158 | return props.major * 10 + props.minor; |
| 159 | |
| 160 | #else |
| 161 | error_gpuQueriedButGpuNotCompiled(); |
| 162 | return -1; |
| 163 | #endif |
| 164 | } |
| 165 | |
| 166 | |
| 167 | bool gpu_isGpuCompiled() { |
no test coverage detected