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
12c69ad4
Commit
12c69ad4
authored
Aug 13, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3095 from vpisarev:restore_ocl_div_mul_and_repeat
parents
30111a78
d97f9fc4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
arithm.cpp
modules/core/src/arithm.cpp
+0
-3
copy.cpp
modules/core/src/copy.cpp
+6
-4
test_arithm.cpp
modules/core/test/ocl/test_arithm.cpp
+2
-2
No files found.
modules/core/src/arithm.cpp
View file @
12c69ad4
...
...
@@ -1491,9 +1491,6 @@ static bool ocl_arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst,
if
(
!
doubleSupport
&&
(
depth2
==
CV_64F
||
depth1
==
CV_64F
))
return
false
;
if
(
(
oclop
==
OCL_OP_MUL_SCALE
||
oclop
==
OCL_OP_DIV_SCALE
)
&&
(
depth1
>=
CV_32F
||
depth2
>=
CV_32F
||
ddepth
>=
CV_32F
)
)
return
false
;
int
kercn
=
haveMask
||
haveScalar
?
cn
:
ocl
::
predictOptimalVectorWidth
(
_src1
,
_src2
,
_dst
);
int
scalarcn
=
kercn
==
3
?
4
:
kercn
,
rowsPerWI
=
d
.
isIntel
()
?
4
:
1
;
...
...
modules/core/src/copy.cpp
View file @
12c69ad4
...
...
@@ -762,7 +762,7 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
flipHoriz
(
dst
.
data
,
dst
.
step
,
dst
.
data
,
dst
.
step
,
dst
.
size
(),
esz
);
}
/*#ifdef HAVE_OPENCL
#if defined HAVE_OPENCL && !defined __APPLE__
static
bool
ocl_repeat
(
InputArray
_src
,
int
ny
,
int
nx
,
OutputArray
_dst
)
{
...
...
@@ -790,7 +790,7 @@ static bool ocl_repeat(InputArray _src, int ny, int nx, OutputArray _dst)
return
k
.
run
(
2
,
globalsize
,
NULL
,
false
);
}
#endif
*/
#endif
void
repeat
(
InputArray
_src
,
int
ny
,
int
nx
,
OutputArray
_dst
)
{
...
...
@@ -800,8 +800,10 @@ void repeat(InputArray _src, int ny, int nx, OutputArray _dst)
Size
ssize
=
_src
.
size
();
_dst
.
create
(
ssize
.
height
*
ny
,
ssize
.
width
*
nx
,
_src
.
type
());
/*CV_OCL_RUN(_dst.isUMat(),
ocl_repeat(_src, ny, nx, _dst))*/
#if !defined __APPLE__
CV_OCL_RUN
(
_dst
.
isUMat
(),
ocl_repeat
(
_src
,
ny
,
nx
,
_dst
))
#endif
Mat
src
=
_src
.
getMat
(),
dst
=
_dst
.
getMat
();
Size
dsize
=
dst
.
size
();
...
...
modules/core/test/ocl/test_arithm.cpp
View file @
12c69ad4
...
...
@@ -341,7 +341,7 @@ OCL_TEST_P(Mul, Mat_Scalar_Scale)
OCL_OFF
(
cv
::
multiply
(
src1_roi
,
val
,
dst1_roi
,
val
[
0
]));
OCL_ON
(
cv
::
multiply
(
usrc1_roi
,
val
,
udst1_roi
,
val
[
0
]));
Near
(
udst1_roi
.
depth
()
>=
CV_32F
?
1
e-2
:
1
);
Near
(
udst1_roi
.
depth
()
>=
CV_32F
?
2
e-2
:
1
);
}
}
...
...
@@ -397,7 +397,7 @@ OCL_TEST_P(Div, Mat_Scale)
OCL_OFF
(
cv
::
divide
(
src1_roi
,
src2_roi
,
dst1_roi
,
val
[
0
]));
OCL_ON
(
cv
::
divide
(
usrc1_roi
,
usrc2_roi
,
udst1_roi
,
val
[
0
]));
Near
(
udst1_roi
.
depth
()
>=
CV_32F
?
4e-3
:
1
);
Near
(
udst1_roi
.
depth
()
>=
CV_32F
?
2e-2
:
1
);
}
}
...
...
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