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
50946b59
Commit
50946b59
authored
Dec 10, 2012
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor device namespace refactor
parent
5fe9bb71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
12 deletions
+23
-12
cuda_devptrs.hpp
modules/core/include/opencv2/core/cuda_devptrs.hpp
+14
-0
CMakeLists.txt
modules/gpu/CMakeLists.txt
+4
-9
common.hpp
modules/gpu/include/opencv2/gpu/device/common.hpp
+5
-3
No files found.
modules/core/include/opencv2/core/cuda_devptrs.hpp
View file @
50946b59
...
...
@@ -152,6 +152,20 @@ namespace cv
//#undef __CV_GPU_DEPR_BEFORE__
//#undef __CV_GPU_DEPR_AFTER__
namespace
device
{
using
cv
::
gpu
::
PtrSz
;
using
cv
::
gpu
::
PtrStep
;
using
cv
::
gpu
::
PtrStepSz
;
using
cv
::
gpu
::
PtrStepSzb
;
using
cv
::
gpu
::
PtrStepSzf
;
using
cv
::
gpu
::
PtrStepSzi
;
using
cv
::
gpu
::
PtrStepb
;
using
cv
::
gpu
::
PtrStepf
;
using
cv
::
gpu
::
PtrStepi
;
}
}
}
...
...
modules/gpu/CMakeLists.txt
View file @
50946b59
...
...
@@ -22,17 +22,14 @@ source_group("Device" FILES ${lib_device_hdrs})
source_group
(
"Device
\\
Detail"
FILES
${
lib_device_hdrs_detail
}
)
if
(
HAVE_CUDA
)
file
(
GLOB_RECURSE ncv_srcs
"src/nvidia/*.cpp"
)
file
(
GLOB_RECURSE ncv_cuda
"src/nvidia/*.cu"
)
file
(
GLOB_RECURSE ncv_hdrs
"src/nvidia/*.hpp"
"src/nvidia/*.h"
)
set
(
ncv_files
${
ncv_srcs
}
${
ncv_hdrs
}
${
ncv_cuda
}
)
file
(
GLOB_RECURSE ncv_srcs
"src/nvidia/*.cpp"
"src/nvidia/*.h*"
)
file
(
GLOB_RECURSE ncv_cuda
"src/nvidia/*.cu"
)
set
(
ncv_files
${
ncv_srcs
}
${
ncv_cuda
}
)
source_group
(
"Src
\\
NVidia"
FILES
${
ncv_files
}
)
ocv_include_directories
(
"src/nvidia"
"src/nvidia/core"
"src/nvidia/NPP_staging"
${
CUDA_INCLUDE_DIRS
}
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations /wd4211 /wd4201 /wd4100 /wd4505 /wd4408
)
string
(
REPLACE
"-Wsign-promo"
""
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
"
)
#set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-keep")
string
(
REPLACE
"-Wsign-promo"
""
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
"
)
#set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;/EHsc-;")
if
(
MSVC
)
...
...
@@ -47,8 +44,6 @@ if (HAVE_CUDA)
ocv_cuda_compile
(
cuda_objs
${
lib_cuda
}
${
ncv_cuda
}
)
#CUDA_BUILD_CLEAN_TARGET()
set
(
cuda_link_libs
${
CUDA_LIBRARIES
}
${
CUDA_npp_LIBRARY
}
)
if
(
NOT APPLE
)
...
...
modules/gpu/include/opencv2/gpu/device/common.hpp
View file @
50946b59
...
...
@@ -85,8 +85,6 @@ static inline void ___cudaSafeCall(cudaError_t err, const char *file, const int
cv
::
gpu
::
error
(
cudaGetErrorString
(
err
),
file
,
line
,
func
);
}
#ifdef __CUDACC__
namespace
cv
{
namespace
gpu
{
__host__
__device__
__forceinline__
int
divUp
(
int
total
,
int
grain
)
...
...
@@ -96,6 +94,9 @@ namespace cv { namespace gpu
namespace
device
{
using
cv
::
gpu
::
divUp
;
#ifdef __CUDACC__
typedef
unsigned
char
uchar
;
typedef
unsigned
short
ushort
;
typedef
signed
char
schar
;
...
...
@@ -106,9 +107,10 @@ namespace cv { namespace gpu
cudaChannelFormatDesc
desc
=
cudaCreateChannelDesc
<
T
>
();
cudaSafeCall
(
cudaBindTexture2D
(
0
,
tex
,
img
.
ptr
(),
&
desc
,
img
.
cols
,
img
.
rows
,
img
.
step
)
);
}
#endif // __CUDACC__
}
}}
#endif // __CUDACC__
#endif // __OPENCV_GPU_COMMON_HPP__
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