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
5a166ca9
Commit
5a166ca9
authored
Feb 01, 2011
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed gpu minMax tests under linux
parent
bbdb52f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
20 deletions
+7
-20
arithm.cpp
tests/gpu/src/arithm.cpp
+7
-20
No files found.
tests/gpu/src/arithm.cpp
View file @
5a166ca9
...
...
@@ -697,12 +697,8 @@ struct CV_GpuMinMaxTest: public CvTest
void
test
(
int
rows
,
int
cols
,
int
cn
,
int
depth
)
{
cv
::
Mat
src
(
rows
,
cols
,
CV_MAKE_TYPE
(
depth
,
cn
));
cv
::
RNG
rng
;
for
(
int
i
=
0
;
i
<
src
.
rows
;
++
i
)
{
Mat
row
(
1
,
src
.
cols
*
src
.
elemSize
(),
CV_8U
,
src
.
ptr
(
i
));
rng
.
fill
(
row
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
256
));
}
cv
::
RNG
rng
(
*
ts
->
get_rng
());
rng
.
fill
(
src
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
255
));
double
minVal
,
maxVal
;
cv
::
Point
minLoc
,
maxLoc
;
...
...
@@ -725,7 +721,6 @@ struct CV_GpuMinMaxTest: public CvTest
}
double
minVal_
,
maxVal_
;
cv
::
Point
minLoc_
,
maxLoc_
;
cv
::
gpu
::
minMax
(
cv
::
gpu
::
GpuMat
(
src
),
&
minVal_
,
&
maxVal_
,
cv
::
gpu
::
GpuMat
(),
buf
);
if
(
abs
(
minVal
-
minVal_
)
>
1e-3
f
)
...
...
@@ -743,12 +738,8 @@ struct CV_GpuMinMaxTest: public CvTest
void
test_masked
(
int
rows
,
int
cols
,
int
cn
,
int
depth
)
{
cv
::
Mat
src
(
rows
,
cols
,
CV_MAKE_TYPE
(
depth
,
cn
));
cv
::
RNG
rng
;
for
(
int
i
=
0
;
i
<
src
.
rows
;
++
i
)
{
Mat
row
(
1
,
src
.
cols
*
src
.
elemSize
(),
CV_8U
,
src
.
ptr
(
i
));
rng
.
fill
(
row
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
256
));
}
cv
::
RNG
rng
(
*
ts
->
get_rng
());
rng
.
fill
(
src
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
255
));
cv
::
Mat
mask
(
src
.
size
(),
CV_8U
);
rng
.
fill
(
mask
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
2
));
...
...
@@ -832,12 +823,8 @@ struct CV_GpuMinMaxLocTest: public CvTest
void
test
(
int
rows
,
int
cols
,
int
depth
)
{
cv
::
Mat
src
(
rows
,
cols
,
depth
);
cv
::
RNG
rng
;
for
(
int
i
=
0
;
i
<
src
.
rows
;
++
i
)
{
Mat
row
(
1
,
src
.
cols
*
src
.
elemSize
(),
CV_8U
,
src
.
ptr
(
i
));
rng
.
fill
(
row
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
256
));
}
cv
::
RNG
rng
(
*
ts
->
get_rng
());
rng
.
fill
(
src
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
255
));
cv
::
Mat
mask
(
src
.
size
(),
CV_8U
);
rng
.
fill
(
mask
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
2
));
...
...
@@ -867,7 +854,7 @@ struct CV_GpuMinMaxLocTest: public CvTest
double
minVal_
,
maxVal_
;
cv
::
Point
minLoc_
,
maxLoc_
;
cv
::
gpu
::
minMaxLoc
(
cv
::
gpu
::
GpuMat
(
src
),
&
minVal_
,
&
maxVal_
,
&
minLoc_
,
&
maxLoc_
,
cv
::
gpu
::
GpuMat
(
mask
),
valbuf
,
locbuf
);
CHECK
(
minVal
==
minVal_
,
CvTS
::
FAIL_INVALID_OUTPUT
);
CHECK
(
maxVal
==
maxVal_
,
CvTS
::
FAIL_INVALID_OUTPUT
);
CHECK
(
0
==
memcmp
(
src
.
ptr
(
minLoc
.
y
)
+
minLoc
.
x
*
src
.
elemSize
(),
src
.
ptr
(
minLoc_
.
y
)
+
minLoc_
.
x
*
src
.
elemSize
(),
src
.
elemSize
()),
...
...
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