Merge pull request #2801 from ilya-lavrenov:tapi_reduction
[profile/ivi/opencv.git] / cmake / checks / OpenCVDetectCudaArch.cu
1 #include <stdio.h>
2 int main()
3 {
4     int count = 0;
5     if (cudaSuccess != cudaGetDeviceCount(&count)){return -1;}
6     if (count == 0) {return -1;}
7     for (int device = 0; device < count; ++device)
8     {
9         cudaDeviceProp prop;
10         if (cudaSuccess != cudaGetDeviceProperties(&prop, device)){ continue;}
11         printf("%d.%d ", prop.major, prop.minor);
12     }
13     return 0;
14 }