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
60b59eeb
Commit
60b59eeb
authored
Nov 20, 2013
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround for AMD bug: UNREACHABLE EXECUTED
parent
b197ec94
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
arithm.cpp
modules/ocl/src/arithm.cpp
+7
-0
arithm_absdiff_nonsaturate.cl
modules/ocl/src/opencl/arithm_absdiff_nonsaturate.cl
+6
-0
No files found.
modules/ocl/src/arithm.cpp
View file @
60b59eeb
...
...
@@ -603,6 +603,12 @@ static void arithm_absdiff_nonsaturate_run(const oclMat & src1, const oclMat & s
}
CV_Assert
(
src1
.
step
%
src1
.
elemSize
()
==
0
&&
(
src2
.
empty
()
||
src2
.
step
%
src2
.
elemSize
()
==
0
));
if
(
src2
.
empty
()
&&
(
src1
.
depth
()
==
CV_8U
||
src1
.
depth
()
==
CV_16U
))
{
src1
.
convertTo
(
diff
,
CV_32S
);
return
;
}
int
ddepth
=
std
::
max
(
src1
.
depth
(),
CV_32S
);
if
(
ntype
==
NORM_L2
)
ddepth
=
std
::
max
<
int
>
(
CV_32F
,
ddepth
);
...
...
@@ -639,6 +645,7 @@ static void arithm_absdiff_nonsaturate_run(const oclMat & src1, const oclMat & s
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
src2offset1
));
kernelName
+=
"_binary"
;
buildOptions
+=
" -D BINARY"
;
}
args
.
push_back
(
make_pair
(
sizeof
(
cl_mem
),
(
void
*
)
&
diff
.
data
));
...
...
modules/ocl/src/opencl/arithm_absdiff_nonsaturate.cl
View file @
60b59eeb
...
...
@@ -52,6 +52,8 @@
#
endif
#
endif
#
ifdef
BINARY
__kernel
void
arithm_absdiff_nonsaturate_binary
(
__global
srcT
*src1,
int
src1_step,
int
src1_offset,
__global
srcT
*src2,
int
src2_step,
int
src2_offset,
__global
dstT
*dst,
int
dst_step,
int
dst_offset,
...
...
@@ -78,6 +80,8 @@ __kernel void arithm_absdiff_nonsaturate_binary(__global srcT *src1, int src1_st
}
}
#
else
__kernel
void
arithm_absdiff_nonsaturate
(
__global
srcT
*src1,
int
src1_step,
int
src1_offset,
__global
dstT
*dst,
int
dst_step,
int
dst_offset,
int
cols,
int
rows
)
...
...
@@ -99,3 +103,5 @@ __kernel void arithm_absdiff_nonsaturate(__global srcT *src1, int src1_step, int
}
}
}
#
endif
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