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
c3b05cf3
Commit
c3b05cf3
authored
Mar 03, 2011
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added command line args parsing into gpu performance sample
parent
f025e473
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
performance.cpp
samples/gpu/performance/performance.cpp
+20
-6
No files found.
samples/gpu/performance/performance.cpp
View file @
c3b05cf3
#include <iomanip>
#include <iomanip>
#include <stdexcept>
#include <stdexcept>
#include <string>
#include "performance.h"
#include "performance.h"
using
namespace
std
;
using
namespace
std
;
...
@@ -151,12 +152,25 @@ int CV_CDECL cvErrorCallback(int /*status*/, const char* /*func_name*/,
...
@@ -151,12 +152,25 @@ int CV_CDECL cvErrorCallback(int /*status*/, const char* /*func_name*/,
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
if
(
argc
<
3
)
// Parse command line arguments
cout
<<
"Usage: performance_gpu <test_filter> <working_dir_with_slash>
\n\n
"
;
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
if
(
argc
>=
2
)
{
TestSystem
::
instance
().
setTestFilter
(
argv
[
1
]);
string
key
=
argv
[
i
];
if
(
argc
>=
3
)
if
(
key
==
"--help"
)
TestSystem
::
instance
().
setWorkingDir
(
argv
[
2
]);
{
cout
<<
"Usage: performance_gpu [--filter <test_filter>] [--working-dir <working_dir_with_slash>]
\n
"
;
return
0
;
}
if
(
key
==
"--filter"
&&
i
+
1
<
argc
)
TestSystem
::
instance
().
setTestFilter
(
argv
[
++
i
]);
else
if
(
key
==
"--working-dir"
&&
i
+
1
<
argc
)
TestSystem
::
instance
().
setWorkingDir
(
argv
[
++
i
]);
else
{
cout
<<
"Unknown parameter: '"
<<
key
<<
"'"
<<
endl
;
return
-
1
;
}
}
redirectError
(
cvErrorCallback
);
redirectError
(
cvErrorCallback
);
TestSystem
::
instance
().
run
();
TestSystem
::
instance
().
run
();
...
...
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