Merge pull request #2060 from asmorkalov:ocv_ts_cuda
This commit is contained in:
commit
60906d9175
@ -7,10 +7,6 @@ endif()
|
|||||||
set(OPENCV_MODULE_TYPE STATIC)
|
set(OPENCV_MODULE_TYPE STATIC)
|
||||||
set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
|
set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
|
||||||
|
|
||||||
if(HAVE_CUDA)
|
|
||||||
ocv_include_directories(${CUDA_INCLUDE_DIRS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
|
||||||
|
|
||||||
ocv_add_module(ts opencv_core opencv_features2d)
|
ocv_add_module(ts opencv_core opencv_features2d)
|
||||||
|
@ -45,10 +45,6 @@
|
|||||||
|
|
||||||
#include "cvconfig.h"
|
#include "cvconfig.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
|
||||||
#include <cuda_runtime.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
namespace perf
|
namespace perf
|
||||||
@ -260,44 +256,8 @@ namespace perf
|
|||||||
void printCudaInfo()
|
void printCudaInfo()
|
||||||
{
|
{
|
||||||
printOsInfo();
|
printOsInfo();
|
||||||
#ifndef HAVE_CUDA
|
for (int i = 0; i < cv::gpu::getCudaEnabledDeviceCount(); i++)
|
||||||
printf("[----------]\n[ GPU INFO ] \tOpenCV was built without CUDA support.\n[----------]\n"), fflush(stdout);
|
cv::gpu::printCudaDeviceInfo(i);
|
||||||
#else
|
|
||||||
int driver;
|
|
||||||
cudaDriverGetVersion(&driver);
|
|
||||||
|
|
||||||
printf("[----------]\n"), fflush(stdout);
|
|
||||||
printf("[ GPU INFO ] \tCUDA Driver version: %d.\n", driver), fflush(stdout);
|
|
||||||
printf("[ GPU INFO ] \tCUDA Runtime version: %d.\n", CUDART_VERSION), fflush(stdout);
|
|
||||||
printf("[----------]\n"), fflush(stdout);
|
|
||||||
|
|
||||||
printf("[----------]\n"), fflush(stdout);
|
|
||||||
printf("[ GPU INFO ] \tGPU module was compiled for the following GPU archs.\n"), fflush(stdout);
|
|
||||||
printf("[ BIN ] \t%s.\n", CUDA_ARCH_BIN), fflush(stdout);
|
|
||||||
printf("[ PTX ] \t%s.\n", CUDA_ARCH_PTX), fflush(stdout);
|
|
||||||
printf("[----------]\n"), fflush(stdout);
|
|
||||||
|
|
||||||
printf("[----------]\n"), fflush(stdout);
|
|
||||||
int deviceCount = cv::gpu::getCudaEnabledDeviceCount();
|
|
||||||
printf("[ GPU INFO ] \tCUDA device count:: %d.\n", deviceCount), fflush(stdout);
|
|
||||||
printf("[----------]\n"), fflush(stdout);
|
|
||||||
|
|
||||||
for (int i = 0; i < deviceCount; ++i)
|
|
||||||
{
|
|
||||||
cv::gpu::DeviceInfo info(i);
|
|
||||||
|
|
||||||
printf("[----------]\n"), fflush(stdout);
|
|
||||||
printf("[ DEVICE ] \t# %d %s.\n", i, info.name().c_str()), fflush(stdout);
|
|
||||||
printf("[ ] \tCompute capability: %d.%d\n", (int)info.majorVersion(), (int)info.minorVersion()), fflush(stdout);
|
|
||||||
printf("[ ] \tMulti Processor Count: %d\n", info.multiProcessorCount()), fflush(stdout);
|
|
||||||
printf("[ ] \tTotal memory: %d Mb\n", static_cast<int>(static_cast<int>(info.totalMemory() / 1024.0) / 1024.0)), fflush(stdout);
|
|
||||||
printf("[ ] \tFree memory: %d Mb\n", static_cast<int>(static_cast<int>(info.freeMemory() / 1024.0) / 1024.0)), fflush(stdout);
|
|
||||||
if (!info.isCompatible())
|
|
||||||
printf("[ GPU INFO ] \tThis device is NOT compatible with current GPU module build\n");
|
|
||||||
printf("[----------]\n"), fflush(stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct KeypointIdxCompare
|
struct KeypointIdxCompare
|
||||||
|
Loading…
x
Reference in New Issue
Block a user