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
3ec2f7f5
Commit
3ec2f7f5
authored
Jan 27, 2012
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed gpu::device::transform with non-aligned sources (Ticket #1567)
parent
aba37e54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
common.hpp
modules/gpu/src/opencv2/gpu/device/common.hpp
+5
-0
transform_detail.hpp
...es/gpu/src/opencv2/gpu/device/detail/transform_detail.hpp
+5
-2
No files found.
modules/gpu/src/opencv2/gpu/device/common.hpp
View file @
3ec2f7f5
...
...
@@ -72,6 +72,11 @@ namespace cv { namespace gpu
{
return
reinterpret_cast
<
size_t
>
(
ptr
)
%
size
==
0
;
}
static
inline
bool
isAligned
(
size_t
step
,
size_t
size
)
{
return
step
%
size
==
0
;
}
}}
static
inline
void
___cudaSafeCall
(
cudaError_t
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
)
...
...
modules/gpu/src/opencv2/gpu/device/detail/transform_detail.hpp
View file @
3ec2f7f5
...
...
@@ -347,7 +347,8 @@ namespace cv { namespace gpu { namespace device
StaticAssert
<
ft
::
smart_shift
!=
1
>::
check
();
if
(
!
isAligned
(
src
.
data
,
ft
::
smart_shift
*
sizeof
(
T
))
||
!
isAligned
(
dst
.
data
,
ft
::
smart_shift
*
sizeof
(
D
)))
if
(
!
isAligned
(
src
.
data
,
ft
::
smart_shift
*
sizeof
(
T
))
||
!
isAligned
(
src
.
step
,
ft
::
smart_shift
*
sizeof
(
T
))
||
!
isAligned
(
dst
.
data
,
ft
::
smart_shift
*
sizeof
(
D
))
||
!
isAligned
(
dst
.
step
,
ft
::
smart_shift
*
sizeof
(
D
)))
{
TransformDispatcher
<
false
>::
call
(
src
,
dst
,
op
,
mask
,
stream
);
return
;
...
...
@@ -370,7 +371,9 @@ namespace cv { namespace gpu { namespace device
StaticAssert
<
ft
::
smart_shift
!=
1
>::
check
();
if
(
!
isAligned
(
src1
.
data
,
ft
::
smart_shift
*
sizeof
(
T1
))
||
!
isAligned
(
src2
.
data
,
ft
::
smart_shift
*
sizeof
(
T2
))
||
!
isAligned
(
dst
.
data
,
ft
::
smart_shift
*
sizeof
(
D
)))
if
(
!
isAligned
(
src1
.
data
,
ft
::
smart_shift
*
sizeof
(
T1
))
||
!
isAligned
(
src1
.
step
,
ft
::
smart_shift
*
sizeof
(
T1
))
||
!
isAligned
(
src2
.
data
,
ft
::
smart_shift
*
sizeof
(
T2
))
||
!
isAligned
(
src2
.
step
,
ft
::
smart_shift
*
sizeof
(
T2
))
||
!
isAligned
(
dst
.
data
,
ft
::
smart_shift
*
sizeof
(
D
))
||
!
isAligned
(
dst
.
step
,
ft
::
smart_shift
*
sizeof
(
D
)))
{
TransformDispatcher
<
false
>::
call
(
src1
,
src2
,
dst
,
op
,
mask
,
stream
);
return
;
...
...
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