mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 09:07:47 +08:00
fixed cuda capable checks
This commit is contained in:
@@ -134,11 +134,11 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
bool haveCuda = false;
|
||||
#if CV_MAJOR_VERSION < 3
|
||||
#ifdef HAVE_OPENCV_GPU
|
||||
haveCuda = cv::gpu::getCudaEnabledDeviceCount() != 0;
|
||||
haveCuda = cv::gpu::getCudaEnabledDeviceCount() > 0;
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_OPENCV_CUDAFEATURES2D
|
||||
haveCuda = cv::cuda::getCudaEnabledDeviceCount() != 0;
|
||||
haveCuda = cv::cuda::getCudaEnabledDeviceCount() > 0;
|
||||
#endif
|
||||
#endif
|
||||
if(!haveCuda)
|
||||
|
||||
Reference in New Issue
Block a user