Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
62b593ca
Commit
62b593ca
authored
Apr 11, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Apr 11, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #793 from SpecLad:auto-cuda
parents
7711fe2f
e8721f1f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
75 deletions
+49
-75
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+22
-6
CMakeLists.txt
modules/core/CMakeLists.txt
+9
-13
CMakeLists.txt
modules/nonfree/CMakeLists.txt
+2
-25
surf.cu
modules/nonfree/src/cuda/surf.cu
+4
-2
vibe.cu
modules/nonfree/src/cuda/vibe.cu
+4
-3
CMakeLists.txt
modules/superres/CMakeLists.txt
+2
-26
btv_l1_gpu.cu
modules/superres/src/cuda/btv_l1_gpu.cu
+6
-0
No files found.
cmake/OpenCVModule.cmake
View file @
62b593ca
...
...
@@ -432,11 +432,19 @@ macro(ocv_glob_module_sources)
file
(
GLOB lib_hdrs
"include/opencv2/
${
name
}
/*.hpp"
"include/opencv2/
${
name
}
/*.h"
)
file
(
GLOB lib_hdrs_detail
"include/opencv2/
${
name
}
/detail/*.hpp"
"include/opencv2/
${
name
}
/detail/*.h"
)
file
(
GLOB cl_kernels
"src/opencl/*.cl"
)
file
(
GLOB lib_cuda_srcs
"src/cuda/*.cu"
)
set
(
cuda_objs
""
)
set
(
lib_cuda_hdrs
""
)
source_group
(
"Src"
FILES
${
lib_srcs
}
${
lib_int_hdrs
}
)
source_group
(
"Include"
FILES
${
lib_hdrs
}
)
source_group
(
"Include
\\
detail"
FILES
${
lib_hdrs_detail
}
)
if
(
HAVE_CUDA AND lib_cuda_srcs
)
ocv_include_directories
(
${
CUDA_INCLUDE_DIRS
}
)
file
(
GLOB lib_cuda_hdrs
"src/cuda/*.hpp"
)
ocv_cuda_compile
(
cuda_objs
${
lib_cuda_srcs
}
${
lib_cuda_hdrs
}
)
source_group
(
"Src
\\
Cuda"
FILES
${
lib_cuda_srcs
}
${
lib_cuda_hdrs
}
)
endif
()
file
(
GLOB cl_kernels
"src/opencl/*.cl"
)
if
(
HAVE_OPENCL AND cl_kernels
)
ocv_include_directories
(
${
OPENCL_INCLUDE_DIRS
}
)
...
...
@@ -448,7 +456,12 @@ macro(ocv_glob_module_sources)
list
(
APPEND lib_srcs
${
cl_kernels
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/kernels.cpp"
)
endif
()
ocv_set_module_sources
(
${
ARGN
}
HEADERS
${
lib_hdrs
}
${
lib_hdrs_detail
}
SOURCES
${
lib_srcs
}
${
lib_int_hdrs
}
)
source_group
(
"Src"
FILES
${
lib_srcs
}
${
lib_int_hdrs
}
)
source_group
(
"Include"
FILES
${
lib_hdrs
}
)
source_group
(
"Include
\\
detail"
FILES
${
lib_hdrs_detail
}
)
ocv_set_module_sources
(
${
ARGN
}
HEADERS
${
lib_hdrs
}
${
lib_hdrs_detail
}
SOURCES
${
lib_srcs
}
${
lib_int_hdrs
}
${
cuda_objs
}
${
lib_cuda_srcs
}
${
lib_cuda_hdrs
}
)
endmacro
()
# creates OpenCV module in current folder
...
...
@@ -461,6 +474,9 @@ macro(ocv_create_module)
if
(
NOT
"
${
ARGN
}
"
STREQUAL
"SKIP_LINK"
)
target_link_libraries
(
${
the_module
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS
}
${
OPENCV_MODULE_
${
the_module
}
_DEPS_EXT
}
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBS
}
${
ARGN
}
)
if
(
HAVE_CUDA
)
target_link_libraries
(
${
the_module
}
${
CUDA_LIBRARIES
}
${
CUDA_npp_LIBRARY
}
)
endif
()
if
(
HAVE_OPENCL AND OPENCL_LIBRARIES
)
target_link_libraries
(
${
the_module
}
${
OPENCL_LIBRARIES
}
)
endif
()
...
...
@@ -545,8 +561,8 @@ endmacro()
# ocv_define_module(module_name [INTERNAL] [REQUIRED] [<list of dependencies>] [OPTIONAL <list of optional dependencies>])
macro
(
ocv_define_module module_name
)
ocv_add_module
(
${
module_name
}
${
ARGN
}
)
ocv_glob_module_sources
()
ocv_module_include_directories
()
ocv_glob_module_sources
()
ocv_create_module
()
ocv_add_precompiled_headers
(
${
the_module
}
)
...
...
modules/core/CMakeLists.txt
View file @
62b593ca
...
...
@@ -3,25 +3,21 @@ ocv_add_module(core ${ZLIB_LIBRARIES})
ocv_module_include_directories
(
${
ZLIB_INCLUDE_DIR
}
)
if
(
HAVE_CUDA
)
ocv_source_group
(
"Src
\\
Cuda"
GLOB
"src/cuda/*.cu"
)
ocv_include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/modules/gpu/include"
${
CUDA_INCLUDE_DIRS
}
)
ocv_include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/modules/gpu/include"
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef
)
endif
()
file
(
GLOB lib_cuda
"src/cuda/*.cu
"
)
ocv_cuda_compile
(
cuda_objs
${
lib_cuda
}
)
file
(
GLOB lib_cuda_hdrs
"include/opencv2/
${
name
}
/cuda/*.hpp"
"include/opencv2/
${
name
}
/cuda/*.h
"
)
file
(
GLOB lib_cuda_hdrs_detail
"include/opencv2/
${
name
}
/cuda/detail/*.hpp"
"include/opencv2/
${
name
}
/cuda/detail/*.h"
)
set
(
cuda_link_libs
${
CUDA_LIBRARIES
}
${
CUDA_npp_LIBRARY
}
)
else
()
set
(
lib_cuda
""
)
set
(
cuda_objs
""
)
set
(
cuda_link_libs
""
)
endif
()
source_group
(
"Cuda Headers"
FILES
${
lib_cuda_hdrs
}
)
source_group
(
"Cuda Headers
\\
Detail"
FILES
${
lib_cuda_hdrs_detail
}
)
ocv_glob_module_sources
(
SOURCES
${
lib_cuda
}
${
cuda_objs
}
"
${
opencv_core_BINARY_DIR
}
/version_string.inc"
)
ocv_glob_module_sources
(
SOURCES
"
${
opencv_core_BINARY_DIR
}
/version_string.inc"
HEADERS
${
lib_cuda_hdrs
}
${
lib_cuda_hdrs_detail
}
)
ocv_create_module
(
${
cuda_link_libs
}
)
ocv_create_module
()
ocv_add_precompiled_headers
(
${
the_module
}
)
ocv_add_accuracy_tests
()
ocv_add_perf_tests
()
modules/nonfree/CMakeLists.txt
View file @
62b593ca
...
...
@@ -3,28 +3,5 @@ if(BUILD_ANDROID_PACKAGE)
endif
()
set
(
the_description
"Functionality with possible limitations on the use"
)
ocv_add_module
(
nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpu opencv_ocl
)
ocv_module_include_directories
()
if
(
HAVE_CUDA AND HAVE_opencv_gpu
)
ocv_source_group
(
"Src
\\
Cuda"
GLOB
"src/cuda/*.cu"
)
ocv_include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/modules/gpu/include"
${
CUDA_INCLUDE_DIRS
}
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef
)
file
(
GLOB lib_cuda
"src/cuda/*.cu"
)
ocv_cuda_compile
(
cuda_objs
${
lib_cuda
}
)
set
(
cuda_link_libs
${
CUDA_LIBRARIES
}
${
CUDA_npp_LIBRARY
}
)
else
()
set
(
lib_cuda
""
)
set
(
cuda_objs
""
)
set
(
cuda_link_libs
""
)
endif
()
ocv_glob_module_sources
(
SOURCES
${
lib_cuda
}
${
cuda_objs
}
)
ocv_create_module
(
${
cuda_link_libs
}
)
ocv_add_precompiled_headers
(
${
the_module
}
)
ocv_add_accuracy_tests
()
ocv_add_perf_tests
()
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef
)
ocv_define_module
(
nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpu opencv_ocl
)
modules/nonfree/src/cuda/surf.cu
View file @
62b593ca
...
...
@@ -40,7 +40,9 @@
//
//M*/
#if !defined CUDA_DISABLER
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
#include "opencv2/gpu/device/common.hpp"
#include "opencv2/gpu/device/limits.hpp"
...
...
@@ -956,4 +958,4 @@ namespace cv { namespace gpu { namespace device
}}} // namespace cv { namespace gpu { namespace device
#endif /*
CUDA_DISABLER
*/
#endif /*
HAVE_OPENCV_GPU
*/
modules/nonfree/src/cuda/vibe.cu
View file @
62b593ca
...
...
@@ -40,7 +40,9 @@
//
//M*/
#if !defined CUDA_DISABLER
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
#include "opencv2/gpu/device/common.hpp"
...
...
@@ -266,5 +268,4 @@ namespace cv { namespace gpu { namespace device
}
}}}
#endif /* CUDA_DISABLER */
#endif /* HAVE_OPENCV_GPU */
modules/superres/CMakeLists.txt
View file @
62b593ca
...
...
@@ -3,29 +3,5 @@ if(ANDROID OR IOS)
endif
()
set
(
the_description
"Super Resolution"
)
ocv_add_module
(
superres opencv_imgproc opencv_video OPTIONAL opencv_gpu opencv_highgui
)
ocv_module_include_directories
()
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef /wd4127
)
if
(
HAVE_CUDA
)
ocv_source_group
(
"Src
\\
Cuda"
GLOB
"src/cuda/*.cu"
)
ocv_include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/modules/gpu/include"
${
CUDA_INCLUDE_DIRS
}
)
file
(
GLOB lib_cuda
"src/cuda/*.cu"
)
ocv_cuda_compile
(
cuda_objs
${
lib_cuda
}
)
set
(
cuda_link_libs
${
CUDA_LIBRARIES
}
)
else
()
set
(
lib_cuda
""
)
set
(
cuda_objs
""
)
set
(
cuda_link_libs
""
)
endif
()
ocv_glob_module_sources
(
SOURCES
${
lib_cuda
}
${
cuda_objs
}
)
ocv_create_module
(
${
cuda_link_libs
}
)
ocv_add_precompiled_headers
(
${
the_module
}
)
ocv_add_accuracy_tests
()
ocv_add_perf_tests
()
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4127 -Wundef
)
ocv_define_module
(
superres opencv_imgproc opencv_video OPTIONAL opencv_gpu opencv_highgui
)
modules/superres/src/cuda/btv_l1_gpu.cu
View file @
62b593ca
...
...
@@ -40,6 +40,10 @@
//
//M*/
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
#include "opencv2/gpu/device/common.hpp"
#include "opencv2/gpu/device/transform.hpp"
#include "opencv2/gpu/device/vec_traits.hpp"
...
...
@@ -232,3 +236,5 @@ namespace btv_l1_device
template void calcBtvRegularization<3>(PtrStepSzb src, PtrStepSzb dst, int ksize);
template void calcBtvRegularization<4>(PtrStepSzb src, PtrStepSzb dst, int ksize);
}
#endif /* HAVE_OPENCV_GPU */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment