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
d2f1c007
Commit
d2f1c007
authored
Aug 05, 2014
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3045 from vbystricky:ocl_MeanStdDevFix
parents
06547120
774d277c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
meanstddev.cl
modules/core/src/opencl/meanstddev.cl
+1
-1
stat.cpp
modules/core/src/stat.cpp
+4
-2
No files found.
modules/core/src/opencl/meanstddev.cl
View file @
d2f1c007
...
...
@@ -59,7 +59,7 @@ __kernel void meanStdDev(__global const uchar * srcptr, int src_step, int src_of
for
(
int
grain
=
groups
*
WGS
; id < total; id += grain)
{
#
ifdef
HAVE_MASK
#
ifdef
HAVE_
SRC
_CONT
#
ifdef
HAVE_
MASK
_CONT
int
mask_index
=
id
;
#
else
int
mask_index
=
mad24
(
id
/
cols,
mask_step,
id
%
cols
)
;
...
...
modules/core/src/stat.cpp
View file @
d2f1c007
...
...
@@ -918,7 +918,8 @@ static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv
{
int
type
=
_src
.
type
(),
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
);
bool
doubleSupport
=
ocl
::
Device
::
getDefault
().
doubleFPConfig
()
>
0
,
isContinuous
=
_src
.
isContinuous
();
isContinuous
=
_src
.
isContinuous
(),
isMaskContinuous
=
_mask
.
isContinuous
();
const
ocl
::
Device
&
defDev
=
ocl
::
Device
::
getDefault
();
int
groups
=
defDev
.
maxComputeUnits
();
if
(
defDev
.
isIntel
())
...
...
@@ -943,13 +944,14 @@ static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv
char
cvt
[
2
][
40
];
String
opts
=
format
(
"-D srcT=%s -D srcT1=%s -D dstT=%s -D dstT1=%s -D sqddepth=%d"
" -D sqdstT=%s -D sqdstT1=%s -D convertToSDT=%s -D cn=%d%s"
" -D sqdstT=%s -D sqdstT1=%s -D convertToSDT=%s -D cn=%d%s
%s
"
" -D convertToDT=%s -D WGS=%d -D WGS2_ALIGNED=%d%s%s"
,
ocl
::
typeToStr
(
type
),
ocl
::
typeToStr
(
depth
),
ocl
::
typeToStr
(
dtype
),
ocl
::
typeToStr
(
ddepth
),
sqddepth
,
ocl
::
typeToStr
(
sqdtype
),
ocl
::
typeToStr
(
sqddepth
),
ocl
::
convertTypeStr
(
depth
,
sqddepth
,
cn
,
cvt
[
0
]),
cn
,
isContinuous
?
" -D HAVE_SRC_CONT"
:
""
,
isMaskContinuous
?
" -D HAVE_MASK_CONT"
:
""
,
ocl
::
convertTypeStr
(
depth
,
ddepth
,
cn
,
cvt
[
1
]),
(
int
)
wgs
,
wgs2_aligned
,
haveMask
?
" -D HAVE_MASK"
:
""
,
doubleSupport
?
" -D DOUBLE_SUPPORT"
:
""
);
...
...
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