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
7d97e811
Commit
7d97e811
authored
Aug 06, 2012
by
yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs in tests, set device for each test case
Signed-off-by:
yao
<
bitwangyaoyao@gmail.com
>
parent
505cda43
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
13 deletions
+17
-13
test_blend.cpp
modules/ocl/test/test_blend.cpp
+3
-2
test_columnsum.cpp
modules/ocl/test/test_columnsum.cpp
+3
-0
test_match_template.cpp
modules/ocl/test/test_match_template.cpp
+6
-0
test_pyrdown.cpp
modules/ocl/test/test_pyrdown.cpp
+2
-2
test_pyrup.cpp
modules/ocl/test/test_pyrup.cpp
+3
-9
No files found.
modules/ocl/test/test_blend.cpp
View file @
7d97e811
...
...
@@ -33,7 +33,7 @@ void blendLinearGold(const cv::Mat& img1, const cv::Mat& img2, const cv::Mat& we
PARAM_TEST_CASE
(
Blend
,
cv
::
Size
,
MatType
/*, UseRoi*/
)
{
//cv::gpu::DeviceInfo devI
nfo;
std
::
vector
<
cv
::
ocl
::
Info
>
ocli
nfo
;
cv
::
Size
size
;
int
type
;
bool
useRoi
;
...
...
@@ -45,7 +45,8 @@ PARAM_TEST_CASE(Blend, cv::Size, MatType/*, UseRoi*/)
type
=
GET_PARAM
(
1
);
/*useRoi = GET_PARAM(3);*/
//cv::gpu::setDevice(devInfo.deviceID());
int
devnums
=
getDevice
(
oclinfo
,
OPENCV_DEFAULT_OPENCL_DEVICE
);
CV_Assert
(
devnums
>
0
);
}
};
...
...
modules/ocl/test/test_columnsum.cpp
View file @
7d97e811
...
...
@@ -60,11 +60,14 @@ PARAM_TEST_CASE(ColumnSum, cv::Size, bool )
cv
::
Size
size
;
cv
::
Mat
src
;
bool
useRoi
;
std
::
vector
<
cv
::
ocl
::
Info
>
oclinfo
;
virtual
void
SetUp
()
{
size
=
GET_PARAM
(
0
);
useRoi
=
GET_PARAM
(
1
);
int
devnums
=
getDevice
(
oclinfo
,
OPENCV_DEFAULT_OPENCL_DEVICE
);
CV_Assert
(
devnums
>
0
);
}
};
...
...
modules/ocl/test/test_match_template.cpp
View file @
7d97e811
...
...
@@ -60,6 +60,7 @@ PARAM_TEST_CASE(MatchTemplate8U, cv::Size, TemplateSize, Channels, TemplateMetho
cv
::
Size
templ_size
;
int
cn
;
int
method
;
std
::
vector
<
cv
::
ocl
::
Info
>
oclinfo
;
virtual
void
SetUp
()
{
...
...
@@ -67,6 +68,8 @@ PARAM_TEST_CASE(MatchTemplate8U, cv::Size, TemplateSize, Channels, TemplateMetho
templ_size
=
GET_PARAM
(
1
);
cn
=
GET_PARAM
(
2
);
method
=
GET_PARAM
(
3
);
int
devnums
=
getDevice
(
oclinfo
,
OPENCV_DEFAULT_OPENCL_DEVICE
);
CV_Assert
(
devnums
>
0
);
}
};
...
...
@@ -109,6 +112,7 @@ PARAM_TEST_CASE(MatchTemplate32F, cv::Size, TemplateSize, Channels, TemplateMeth
cv
::
Size
templ_size
;
int
cn
;
int
method
;
std
::
vector
<
cv
::
ocl
::
Info
>
oclinfo
;
virtual
void
SetUp
()
{
...
...
@@ -116,6 +120,8 @@ PARAM_TEST_CASE(MatchTemplate32F, cv::Size, TemplateSize, Channels, TemplateMeth
templ_size
=
GET_PARAM
(
1
);
cn
=
GET_PARAM
(
2
);
method
=
GET_PARAM
(
3
);
int
devnums
=
getDevice
(
oclinfo
,
OPENCV_DEFAULT_OPENCL_DEVICE
);
CV_Assert
(
devnums
>
0
);
}
};
...
...
modules/ocl/test/test_pyrdown.cpp
View file @
7d97e811
...
...
@@ -119,8 +119,8 @@ PARAM_TEST_CASE(PyrDown, MatType, bool)
val
=
cv
::
Scalar
(
rng
.
uniform
(
-
10.0
,
10.0
),
rng
.
uniform
(
-
10.0
,
10.0
),
rng
.
uniform
(
-
10.0
,
10.0
),
rng
.
uniform
(
-
10.0
,
10.0
));
//
int devnums = getDevice(oclinfo);
//
CV_Assert(devnums > 0);
int
devnums
=
getDevice
(
oclinfo
);
CV_Assert
(
devnums
>
0
);
//if you want to use undefault device, set it here
//setDevice(oclinfo[0]);
}
...
...
modules/ocl/test/test_pyrup.cpp
View file @
7d97e811
...
...
@@ -49,22 +49,16 @@
#ifdef HAVE_OPENCL
PARAM_TEST_CASE
(
PyrUp
,
cv
::
Size
,
int
)
{
cv
::
Size
size
;
int
type
;
std
::
vector
<
cv
::
ocl
::
Info
>
oclinfo
;
virtual
void
SetUp
()
{
int
devnums
=
cv
::
ocl
::
getDevice
(
oclinfo
,
OPENCV_DEFAULT_OPENCL_DEVICE
);
CV_Assert
(
devnums
>
0
);
size
=
GET_PARAM
(
0
);
type
=
GET_PARAM
(
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