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
529bd417
Commit
529bd417
authored
Dec 20, 2013
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build fixes for case where HAVE_CUDA==OFF.
parent
069f3d8d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
CMakeLists.txt
modules/core/CMakeLists.txt
+8
-6
gpumat.cpp
modules/core/src/gpumat.cpp
+1
-1
stitching_detailed.cpp
samples/cpp/stitching_detailed.cpp
+4
-4
No files found.
modules/core/CMakeLists.txt
View file @
529bd417
set
(
the_description
"The Core Functionality"
)
if
(
ENABLE_DYNAMIC_CUDA
)
if
(
NOT HAVE_CUDA OR
ENABLE_DYNAMIC_CUDA
)
ocv_add_module
(
core PRIVATE_REQUIRED
${
ZLIB_LIBRARIES
}
)
else
()
ocv_add_module
(
core PRIVATE_REQUIRED
${
ZLIB_LIBRARIES
}
${
CUDA_LIBRARIES
}
${
CUDA_npp_LIBRARY
}
)
...
...
@@ -15,7 +15,9 @@ endif()
if
(
ENABLE_DYNAMIC_CUDA
)
add_definitions
(
-DDYNAMIC_CUDA_SUPPORT
)
else
()
add_definitions
(
-DUSE_CUDA
)
if
(
HAVE_CUDA
)
add_definitions
(
-DUSE_CUDA
)
endif
()
endif
()
if
(
HAVE_CUDA
)
...
...
@@ -26,18 +28,18 @@ endif()
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"
)
if
(
NOT ENABLE_DYNAMIC_CUDA
)
file
(
GLOB lib_cuda
"../dynamicuda/src/cuda/*.cu*"
)
if
(
HAVE_CUDA AND
NOT ENABLE_DYNAMIC_CUDA
)
file
(
GLOB lib_cuda
"../dynamicuda/src/cuda/*.cu*"
)
endif
()
source_group
(
"Cuda Headers"
FILES
${
lib_cuda_hdrs
}
)
source_group
(
"Cuda Headers
\\
Detail"
FILES
${
lib_cuda_hdrs_detail
}
)
if
(
NOT ENABLE_DYNAMIC_CUDA
)
if
(
HAVE_CUDA AND
NOT ENABLE_DYNAMIC_CUDA
)
source_group
(
"Src
\\
Cuda"
FILES
${
lib_cuda
}
${
lib_cuda_hdrs
}
)
endif
()
if
(
ENABLE_DYNAMIC_CUDA
)
if
(
NOT HAVE_CUDA OR
ENABLE_DYNAMIC_CUDA
)
ocv_glob_module_sources
(
SOURCES
"
${
opencv_core_BINARY_DIR
}
/version_string.inc"
HEADERS
${
lib_cuda_hdrs
}
${
lib_cuda_hdrs_detail
}
)
else
()
...
...
modules/core/src/gpumat.cpp
View file @
529bd417
...
...
@@ -229,7 +229,7 @@ static DeviceInfoFuncTable* deviceInfoFuncTable()
static
CudaDeviceInfoFuncTable
impl
;
static
DeviceInfoFuncTable
*
funcTable
=
&
impl
;
#else
static
EmptyFuncTable
stub
;
static
Empty
DeviceInfo
FuncTable
stub
;
static
DeviceInfoFuncTable
*
funcTable
=
&
stub
;
#endif
#endif
...
...
samples/cpp/stitching_detailed.cpp
View file @
529bd417
...
...
@@ -355,7 +355,7 @@ int main(int argc, char* argv[])
Ptr
<
FeaturesFinder
>
finder
;
if
(
features_type
==
"surf"
)
{
#if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU)
#if defined(HAVE_OPENCV_NONFREE) && defined(HAVE_OPENCV_GPU)
&& !defined(ANDROID)
if
(
try_gpu
&&
gpu
::
getCudaEnabledDeviceCount
()
>
0
)
finder
=
new
SurfFeaturesFinderGpu
();
else
...
...
@@ -543,7 +543,7 @@ int main(int argc, char* argv[])
// Warp images and their masks
Ptr
<
WarperCreator
>
warper_creator
;
#if
def HAVE_OPENCV_GPU
#if
defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
if
(
try_gpu
&&
gpu
::
getCudaEnabledDeviceCount
()
>
0
)
{
if
(
warp_type
==
"plane"
)
warper_creator
=
new
cv
::
PlaneWarperGpu
();
...
...
@@ -608,7 +608,7 @@ int main(int argc, char* argv[])
seam_finder
=
new
detail
::
VoronoiSeamFinder
();
else
if
(
seam_find_type
==
"gc_color"
)
{
#if
def HAVE_OPENCV_GPU
#if
defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
if
(
try_gpu
&&
gpu
::
getCudaEnabledDeviceCount
()
>
0
)
seam_finder
=
new
detail
::
GraphCutSeamFinderGpu
(
GraphCutSeamFinderBase
::
COST_COLOR
);
else
...
...
@@ -617,7 +617,7 @@ int main(int argc, char* argv[])
}
else
if
(
seam_find_type
==
"gc_colorgrad"
)
{
#if
def HAVE_OPENCV_GPU
#if
defined(HAVE_OPENCV_GPU) && !defined(ANDROID)
if
(
try_gpu
&&
gpu
::
getCudaEnabledDeviceCount
()
>
0
)
seam_finder
=
new
detail
::
GraphCutSeamFinderGpu
(
GraphCutSeamFinderBase
::
COST_COLOR_GRAD
);
else
...
...
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