File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
modules/core/include/opencv2/core Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1652,6 +1652,10 @@ if(ENABLE_CONFIG_VERIFICATION)
1652
1652
ocv_verify_config()
1653
1653
endif ()
1654
1654
1655
+ if (HAVE_CUDA AND COMMAND CUDA_BUILD_CLEAN_TARGET)
1656
+ CUDA_BUILD_CLEAN_TARGET()
1657
+ endif ()
1658
+
1655
1659
ocv_cmake_hook(POST_FINALIZE)
1656
1660
1657
1661
# ----------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ endif()
28
28
29
29
if (CUDA_FOUND)
30
30
set (HAVE_CUDA 1)
31
+ if (NOT CUDA_VERSION VERSION_LESS 11.0)
32
+ # CUDA 11.0 removes nppicom
33
+ ocv_list_filterout(CUDA_nppi_LIBRARY "nppicom" )
34
+ ocv_list_filterout(CUDA_npp_LIBRARY "nppicom" )
35
+ endif ()
31
36
32
37
if (WITH_CUFFT)
33
38
set (HAVE_CUFFT 1)
@@ -370,4 +375,11 @@ if(HAVE_CUDA)
370
375
set (CUDA_cufft_LIBRARY_ABS ${CUDA_cufft_LIBRARY} )
371
376
ocv_convert_to_lib_name(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY} )
372
377
endif ()
378
+
379
+ if (CMAKE_GENERATOR MATCHES "Visual Studio"
380
+ AND NOT OPENCV_SKIP_CUDA_CMAKE_SUPPRESS_REGENERATION
381
+ )
382
+ message (WARNING "CUDA with MSVS generator is detected. Disabling CMake re-run checks (CMAKE_SUPPRESS_REGENERATION=ON). You need to run CMake manually if updates are required." )
383
+ set (CMAKE_SUPPRESS_REGENERATION ON )
384
+ endif ()
373
385
endif ()
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ namespace cv
106
106
107
107
size_t step;
108
108
109
- __CV_CUDA_HOST_DEVICE__ T* ptr (int y = 0 ) { return ( T*)( ( char *)DevPtr<T>:: data + y * step); }
110
- __CV_CUDA_HOST_DEVICE__ const T* ptr (int y = 0 ) const { return (const T*)( (const char *)DevPtr<T>:: data + y * step); }
109
+ __CV_CUDA_HOST_DEVICE__ T* ptr (int y = 0 ) { return ( T*)( ( char *)((( DevPtr<T>*) this )-> data ) + y * step); }
110
+ __CV_CUDA_HOST_DEVICE__ const T* ptr (int y = 0 ) const { return (const T*)( (const char *)((( DevPtr<T>*) this )-> data ) + y * step); }
111
111
112
112
__CV_CUDA_HOST_DEVICE__ T& operator ()(int y, int x) { return ptr (y)[x]; }
113
113
__CV_CUDA_HOST_DEVICE__ const T& operator ()(int y, int x) const { return ptr (y)[x]; }
You can’t perform that action at this time.
0 commit comments