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
14951dc3
Commit
14951dc3
authored
Sep 17, 2013
by
Alexander Smorkalov
Committed by
OpenCV Buildbot
Sep 17, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1461 from ilya-lavrenov:ocl_dataOperations
parents
d4371833
6a26c448
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
perf_matrix_operation.cpp
modules/ocl/perf/perf_matrix_operation.cpp
+75
-0
No files found.
modules/ocl/perf/perf_matrix_operation.cpp
View file @
14951dc3
...
...
@@ -155,3 +155,78 @@ PERF_TEST_P(setToFixture, setTo,
else
OCL_PERF_ELSE
}
/////////////////// upload ///////////////////////////
typedef
tuple
<
Size
,
int
,
int
>
uploadParams
;
typedef
TestBaseWithParam
<
uploadParams
>
uploadFixture
;
PERF_TEST_P
(
uploadFixture
,
DISABLED_upload
,
testing
::
Combine
(
OCL_TYPICAL_MAT_SIZES
,
testing
::
Range
(
CV_8U
,
CV_64F
),
testing
::
Range
(
1
,
5
)))
{
const
uploadParams
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
int
depth
=
get
<
1
>
(
params
),
cn
=
get
<
2
>
(
params
);
const
int
type
=
CV_MAKE_TYPE
(
depth
,
cn
);
Mat
src
(
srcSize
,
type
),
dst
;
declare
.
in
(
src
,
WARMUP_RNG
);
if
(
RUN_OCL_IMPL
)
{
ocl
::
oclMat
oclDst
;
for
(;
startTimer
(),
next
();
ocl
::
finish
(),
stopTimer
(),
oclDst
.
release
())
oclDst
.
upload
(
src
);
}
else
if
(
RUN_PLAIN_IMPL
)
{
for
(;
startTimer
(),
next
();
ocl
::
finish
(),
stopTimer
(),
dst
.
release
())
dst
=
src
.
clone
();
}
else
OCL_PERF_ELSE
int
value
=
0
;
SANITY_CHECK
(
value
);
}
/////////////////// download ///////////////////////////
typedef
TestBaseWithParam
<
uploadParams
>
downloadFixture
;
PERF_TEST_P
(
downloadFixture
,
DISABLED_download
,
testing
::
Combine
(
OCL_TYPICAL_MAT_SIZES
,
testing
::
Range
(
CV_8U
,
CV_64F
),
testing
::
Range
(
1
,
5
)))
{
const
uploadParams
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
int
depth
=
get
<
1
>
(
params
),
cn
=
get
<
2
>
(
params
);
const
int
type
=
CV_MAKE_TYPE
(
depth
,
cn
);
Mat
src
(
srcSize
,
type
),
dst
;
declare
.
in
(
src
,
WARMUP_RNG
);
if
(
RUN_OCL_IMPL
)
{
ocl
::
oclMat
oclSrc
(
src
);
for
(;
startTimer
(),
next
();
ocl
::
finish
(),
stopTimer
(),
dst
.
release
())
oclSrc
.
download
(
dst
);
}
else
if
(
RUN_PLAIN_IMPL
)
{
for
(;
startTimer
(),
next
();
ocl
::
finish
(),
stopTimer
(),
dst
.
release
())
dst
=
src
.
clone
();
}
else
OCL_PERF_ELSE
int
value
=
0
;
SANITY_CHECK
(
value
);
}
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