\r
void print_info()\r
{ \r
+ printf("\n");\r
#if defined _WIN32\r
# if defined _WIN64\r
- puts("OS: Windows 64\n");\r
+ puts("OS: Windows 64");\r
# else\r
- puts("OS: Windows 32\n");\r
+ puts("OS: Windows 32");\r
# endif\r
#elif defined linux\r
# if defined _LP64\r
- puts("OS: Linux 64\n");\r
+ puts("OS: Linux 64");\r
# else\r
- puts("OS: Linux 32\n");\r
+ puts("OS: Linux 32");\r
# endif\r
#elif defined __APPLE__\r
# if defined _LP64\r
- puts("OS: Apple 64\n");\r
+ puts("OS: Apple 64");\r
# else\r
- puts("OS: Apple 32\n");\r
+ puts("OS: Apple 32");\r
# endif\r
#endif\r
\r
- printf("CUDA version: %d\n\n", CUDART_VERSION);\r
-\r
int deviceCount = cv::gpu::getCudaEnabledDeviceCount();\r
\r
-\r
- printf("Found %d CUDA devices\n\n", deviceCount);\r
+ printf("CUDA version: %d\n", CUDART_VERSION); \r
+ printf("CUDA device count: %d\n\n", deviceCount);\r
\r
for (int i = 0; i < deviceCount; ++i)\r
{\r
cv::gpu::DeviceInfo info(i);\r
printf("Device %d:\n", i);\r
- printf("\tName: %s\n", info.name().c_str());\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
+ printf(" Name: %s\n", info.name().c_str());\r
+ printf(" Compute capability version: %d.%d\n", info.majorVersion(), info.minorVersion());\r
+ printf(" Total memory: %d Mb\n", static_cast<int>(static_cast<int>(info.totalMemory() / 1024.0) / 1024.0));\r
+ printf(" Free memory: %d Mb\n", static_cast<int>(static_cast<int>(info.freeMemory() / 1024.0) / 1024.0));\r
if (info.isCompatible())\r
- puts("\tThis device is compatible with current GPU module build\n");\r
+ puts(" This 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
+ puts(" This device is NOT compatible with current GPU module build\n");\r
}\r
\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
+ puts("GPU module was compiled for the following GPU archs:");\r
+ printf(" BIN: %s\n", CUDA_ARCH_BIN);\r
+ printf(" PTX: %s\n\n", CUDA_ARCH_PTX);\r
}\r
\r
enum OutputLevel\r
\r
static cv::Scalar s = cv::Scalar(1, 2, 3, 4);\r
\r
- cv::Mat mat;\r
+ \r
cv::RNG& rng = cvtest::TS::ptr()->get_rng();\r
- cv::Mat mask = cvtest::randomMat(rng, mat.size(), CV_8UC1, 0.0, 1.5, false);\r
+ cv::Mat mask = cvtest::randomMat(rng, mat_gold.size(), CV_8UC1, 0.0, 1.5, false);\r
+\r
+ cv::Mat mat;\r
\r
ASSERT_NO_THROW(\r
cv::gpu::GpuMat dev_mat(mat_gold);\r