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
fe29af2e
Commit
fe29af2e
authored
Jul 25, 2014
by
Elena Gvozdeva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in reduce.cl
parent
1f0ca00d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
reduce.cl
modules/core/src/opencl/reduce.cl
+1
-1
stat.cpp
modules/core/src/stat.cpp
+2
-1
No files found.
modules/core/src/opencl/reduce.cl
View file @
fe29af2e
...
...
@@ -379,7 +379,7 @@
#
define
REDUCE_GLOBAL
\
dstTK
temp
=
convertToDT
(
loadpix
(
srcptr
+
src_index
))
; \
dstTK
temp2
=
convertToDT
(
loadpix
(
src2ptr
+
src2_index
))
; \
temp
=
SUM_ABS2
(
temp,
temp2
)
)
; \
temp
=
SUM_ABS2
(
temp,
temp2
)
; \
FUNC
(
accumulator,
temp.s0
)
; \
FUNC
(
accumulator,
temp.s1
)
; \
FUNC
(
accumulator,
temp.s2
)
; \
...
...
modules/core/src/stat.cpp
View file @
fe29af2e
...
...
@@ -482,6 +482,7 @@ static bool ocl_sum( InputArray _src, Scalar & res, int sum_op, InputArray _mask
kercn
=
cn
==
1
&&
!
haveMask
?
ocl
::
predictOptimalVectorWidth
(
_src
)
:
1
,
mcn
=
std
::
max
(
cn
,
kercn
);
CV_Assert
(
!
haveSrc2
||
_src2
.
type
()
==
type
);
int
convert_cn
=
haveSrc2
?
mcn
:
cn
;
if
(
(
!
doubleSupport
&&
depth
==
CV_64F
)
||
cn
>
4
)
return
false
;
...
...
@@ -513,7 +514,7 @@ static bool ocl_sum( InputArray _src, Scalar & res, int sum_op, InputArray _mask
haveMask
&&
_mask
.
isContinuous
()
?
" -D HAVE_MASK_CONT"
:
""
,
kercn
,
haveSrc2
?
" -D HAVE_SRC2"
:
""
,
calc2
?
" -D OP_CALC2"
:
""
,
haveSrc2
&&
_src2
.
isContinuous
()
?
" -D HAVE_SRC2_CONT"
:
""
,
depth
<=
CV_32S
&&
ddepth
==
CV_32S
?
ocl
::
convertTypeStr
(
CV_8U
,
ddepth
,
m
cn
,
cvt
[
1
])
:
"noconvert"
);
depth
<=
CV_32S
&&
ddepth
==
CV_32S
?
ocl
::
convertTypeStr
(
CV_8U
,
ddepth
,
convert_
cn
,
cvt
[
1
])
:
"noconvert"
);
ocl
::
Kernel
k
(
"reduce"
,
ocl
::
core
::
reduce_oclsrc
,
opts
);
if
(
k
.
empty
())
...
...
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