#ifdef HAVE_CUDA\r
\r
void print_info()\r
-{\r
+{ \r
+#if defined _WIN32\r
+# if define _WIN64\r
+ puts("OS: Windows 64\n");\r
+# else\r
+ puts("OS: Windows 32\n");\r
+# endif\r
+#elif defined linux\r
+# if defined _LP64\r
+ puts("OS: Linux 64\n");\r
+# else\r
+ puts("OS: Linux 32\n");\r
+# endif\r
+#elif defined __APPLE__\r
+# if defined _LP64\r
+ puts("OS: Apple 64\n");\r
+# else\r
+ puts("OS: Apple 32\n");\r
+# endif\r
+#endif\r
+\r
int deviceCount = cv::gpu::getCudaEnabledDeviceCount();\r
\r
+\r
printf("Found %d CUDA devices\n\n", deviceCount);\r
\r
for (int i = 0; i < deviceCount; ++i)\r
printf("\tCompute capability version: %d.%d\n", info.majorVersion(), info.minorVersion());\r
printf("\tTotal memory: %d Mb\n", static_cast<int>(static_cast<int>(info.totalMemory() / 1024.0) / 1024.0));\r
printf("\tFree memory: %d Mb\n", static_cast<int>(static_cast<int>(info.freeMemory() / 1024.0) / 1024.0));\r
- if (!info.isCompatible())\r
- printf("\tThis device is not compatible with current GPU module build\n");\r
- printf("\n");\r
+ if (info.isCompatible())\r
+ puts("\tThis device is compatible with current GPU module build\n");\r
+ else\r
+ puts("\tThis device is NOT compatible with current GPU module build\n");\r
}\r
\r
- printf("GPU module was compiled for next GPU archs:\n");\r
+ puts("GPU module was compiled for next GPU archs:");\r
printf("\tBIN:%s\n", CUDA_ARCH_BIN);\r
printf("\tPTX:%s\n\n", CUDA_ARCH_PTX);\r
}\r
return 0;\r
}\r
\r
-#endif // HAVE_CUDA
\ No newline at end of file
+#endif // HAVE_CUDA\r