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
56745b54
Commit
56745b54
authored
Nov 29, 2010
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored gpu tests a little
parent
c104cdce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
27 deletions
+59
-27
arithm.cpp
tests/gpu/src/arithm.cpp
+59
-27
No files found.
tests/gpu/src/arithm.cpp
View file @
56745b54
...
...
@@ -680,18 +680,29 @@ struct CV_GpuMinMaxTest: public CvTest
void
run
(
int
)
{
int
depth_end
;
if
(
cv
::
gpu
::
hasNativeDoubleSupport
(
cv
::
gpu
::
getDevice
()))
depth_end
=
CV_64F
;
else
depth_end
=
CV_32F
;
for
(
int
depth
=
CV_8U
;
depth
<=
depth_end
;
++
depth
)
{
for
(
int
i
=
0
;
i
<
3
;
++
i
)
try
{
int
depth_end
;
if
(
cv
::
gpu
::
hasNativeDoubleSupport
(
cv
::
gpu
::
getDevice
()))
depth_end
=
CV_64F
;
else
depth_end
=
CV_32F
;
for
(
int
depth
=
CV_8U
;
depth
<=
depth_end
;
++
depth
)
{
int
rows
=
1
+
rand
()
%
1000
;
int
cols
=
1
+
rand
()
%
1000
;
test
(
rows
,
cols
,
1
,
depth
);
test_masked
(
rows
,
cols
,
1
,
depth
);
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
int
rows
=
1
+
rand
()
%
1000
;
int
cols
=
1
+
rand
()
%
1000
;
test
(
rows
,
cols
,
1
,
depth
);
test_masked
(
rows
,
cols
,
1
,
depth
);
}
}
}
catch
(
const
Exception
&
e
)
{
if
(
!
check_and_treat_gpu_exception
(
e
,
ts
))
throw
;
return
;
}
}
void
test
(
int
rows
,
int
cols
,
int
cn
,
int
depth
)
...
...
@@ -804,19 +815,30 @@ struct CV_GpuMinMaxLocTest: public CvTest
void
run
(
int
)
{
int
depth_end
;
if
(
cv
::
gpu
::
hasNativeDoubleSupport
(
cv
::
gpu
::
getDevice
()))
depth_end
=
CV_64F
;
else
depth_end
=
CV_32F
;
for
(
int
depth
=
CV_8U
;
depth
<=
depth_end
;
++
depth
)
{
int
rows
=
1
,
cols
=
3
;
test
(
rows
,
cols
,
depth
);
for
(
int
i
=
0
;
i
<
4
;
++
i
)
try
{
int
depth_end
;
if
(
cv
::
gpu
::
hasNativeDoubleSupport
(
cv
::
gpu
::
getDevice
()))
depth_end
=
CV_64F
;
else
depth_end
=
CV_32F
;
for
(
int
depth
=
CV_8U
;
depth
<=
depth_end
;
++
depth
)
{
int
rows
=
1
+
rand
()
%
1000
;
int
cols
=
1
+
rand
()
%
1000
;
int
rows
=
1
,
cols
=
3
;
test
(
rows
,
cols
,
depth
);
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
int
rows
=
1
+
rand
()
%
1000
;
int
cols
=
1
+
rand
()
%
1000
;
test
(
rows
,
cols
,
depth
);
}
}
}
catch
(
const
Exception
&
e
)
{
if
(
!
check_and_treat_gpu_exception
(
e
,
ts
))
throw
;
return
;
}
}
void
test
(
int
rows
,
int
cols
,
int
depth
)
...
...
@@ -875,18 +897,28 @@ struct CV_GpuCountNonZeroTest: CvTest
void
run
(
int
)
{
srand
(
0
);
int
depth_end
;
if
(
cv
::
gpu
::
hasNativeDoubleSupport
(
cv
::
gpu
::
getDevice
()))
depth_end
=
CV_64F
;
else
depth_end
=
CV_32F
;
for
(
int
depth
=
CV_8U
;
depth
<=
CV_32F
;
++
depth
)
{
for
(
int
i
=
0
;
i
<
4
;
++
i
)
try
{
int
depth_end
;
if
(
cv
::
gpu
::
hasNativeDoubleSupport
(
cv
::
gpu
::
getDevice
()))
depth_end
=
CV_64F
;
else
depth_end
=
CV_32F
;
for
(
int
depth
=
CV_8U
;
depth
<=
CV_32F
;
++
depth
)
{
int
rows
=
1
+
rand
()
%
1000
;
int
cols
=
1
+
rand
()
%
1000
;
test
(
rows
,
cols
,
depth
);
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
int
rows
=
1
+
rand
()
%
1000
;
int
cols
=
1
+
rand
()
%
1000
;
test
(
rows
,
cols
,
depth
);
}
}
}
catch
(
const
Exception
&
e
)
{
if
(
!
check_and_treat_gpu_exception
(
e
,
ts
))
throw
;
return
;
}
}
void
test
(
int
rows
,
int
cols
,
int
depth
)
...
...
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