Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
673e8ff2
"...assets/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "d0558abb43844102ba4e7d7b56c7953531b33d67"
Commit
673e8ff2
authored
Jun 05, 2019
by
Paul
Browse files
Formatting
parent
3d4d0179
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
src/driver/command.hpp
src/driver/command.hpp
+5
-6
src/driver/main.cpp
src/driver/main.cpp
+2
-8
No files found.
src/driver/command.hpp
View file @
673e8ff2
...
@@ -24,15 +24,14 @@ template <class T>
...
@@ -24,15 +24,14 @@ template <class T>
std
::
string
compute_command_name
()
std
::
string
compute_command_name
()
{
{
static
const
std
::
string
&
tname
=
get_type_name
<
T
>
();
static
const
std
::
string
&
tname
=
get_type_name
<
T
>
();
auto
name
=
tname
.
substr
(
tname
.
rfind
(
"::"
)
+
2
);
auto
name
=
tname
.
substr
(
tname
.
rfind
(
"::"
)
+
2
);
if
(
ends_with
(
name
,
"_command"
))
if
(
ends_with
(
name
,
"_command"
))
name
=
name
.
substr
(
0
,
name
.
size
()
-
8
);
name
=
name
.
substr
(
0
,
name
.
size
()
-
8
);
if
(
ends_with
(
name
,
"_cmd"
))
if
(
ends_with
(
name
,
"_cmd"
))
name
=
name
.
substr
(
0
,
name
.
size
()
-
4
);
name
=
name
.
substr
(
0
,
name
.
size
()
-
4
);
return
name
;
return
name
;
}
}
template
<
class
T
>
template
<
class
T
>
const
std
::
string
&
command_name
()
const
std
::
string
&
command_name
()
{
{
...
...
src/driver/main.cpp
View file @
673e8ff2
...
@@ -125,10 +125,7 @@ struct verify : command<verify>
...
@@ -125,10 +125,7 @@ struct verify : command<verify>
struct
compile
:
command
<
compile
>
struct
compile
:
command
<
compile
>
{
{
compiler
c
;
compiler
c
;
void
parse
(
argument_parser
&
ap
)
void
parse
(
argument_parser
&
ap
)
{
c
.
parse
(
ap
);
}
{
c
.
parse
(
ap
);
}
void
run
()
void
run
()
{
{
...
@@ -141,10 +138,7 @@ struct compile : command<compile>
...
@@ -141,10 +138,7 @@ struct compile : command<compile>
struct
run_cmd
:
command
<
run_cmd
>
struct
run_cmd
:
command
<
run_cmd
>
{
{
compiler
c
;
compiler
c
;
void
parse
(
argument_parser
&
ap
)
void
parse
(
argument_parser
&
ap
)
{
c
.
parse
(
ap
);
}
{
c
.
parse
(
ap
);
}
void
run
()
void
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