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
dc354856
Commit
dc354856
authored
Sep 23, 2018
by
Paul
Browse files
Fix tidy errors
parent
53dde901
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/include/migraph/matcher.hpp
src/include/migraph/matcher.hpp
+4
-3
No files found.
src/include/migraph/matcher.hpp
View file @
dc354856
...
@@ -57,7 +57,7 @@ function_matcher<F> make_function_matcher(F f)
...
@@ -57,7 +57,7 @@ function_matcher<F> make_function_matcher(F f)
template
<
class
M
>
template
<
class
M
>
auto
bind_match
(
M
m
,
std
::
string
name
)
auto
bind_match
(
M
m
,
std
::
string
name
)
{
{
return
make_function_matcher
([
=
](
matcher_context
&
ctx
,
instruction_ref
ins
)
{
return
make_function_matcher
([
=
,
name
=
std
::
move
(
name
)
](
matcher_context
&
ctx
,
instruction_ref
ins
)
{
auto
result
=
m
.
match
(
ctx
,
ins
);
auto
result
=
m
.
match
(
ctx
,
ins
);
if
(
result
!=
ctx
.
not_found
())
if
(
result
!=
ctx
.
not_found
())
ctx
.
instructions
.
emplace
(
name
,
ins
);
ctx
.
instructions
.
emplace
(
name
,
ins
);
...
@@ -70,7 +70,7 @@ struct bindable_matcher
...
@@ -70,7 +70,7 @@ struct bindable_matcher
{
{
M
m
;
M
m
;
auto
bind
(
std
::
string
name
)
{
return
bind_match
(
m
,
name
);
}
auto
bind
(
std
::
string
name
)
{
return
bind_match
(
m
,
std
::
move
(
name
)
)
;
}
instruction_ref
match
(
matcher_context
&
ctx
,
instruction_ref
ins
)
const
instruction_ref
match
(
matcher_context
&
ctx
,
instruction_ref
ins
)
const
{
{
...
@@ -194,6 +194,7 @@ void find_matches(program& p, Ms&&... ms)
...
@@ -194,6 +194,7 @@ void find_matches(program& p, Ms&&... ms)
bool
match
=
false
;
bool
match
=
false
;
each_args
(
each_args
(
[
&
](
auto
&&
m
)
{
[
&
](
auto
&&
m
)
{
// cppcheck-suppress knownConditionTrueFalse
if
(
match
)
if
(
match
)
return
;
return
;
auto
r
=
match_instruction
(
p
,
ins
,
m
.
matcher
());
auto
r
=
match_instruction
(
p
,
ins
,
m
.
matcher
());
...
@@ -248,7 +249,7 @@ MIGRAPH_PRED_MATCHER(standard_shape, instruction_ref ins) { return ins->get_shap
...
@@ -248,7 +249,7 @@ MIGRAPH_PRED_MATCHER(standard_shape, instruction_ref ins) { return ins->get_shap
inline
auto
name
(
std
::
string
name
)
inline
auto
name
(
std
::
string
name
)
{
{
return
make_basic_pred_matcher
([
=
](
instruction_ref
ins
)
{
return
ins
->
name
()
==
name
;
});
return
make_basic_pred_matcher
([
=
,
name
=
std
::
move
(
name
)
](
instruction_ref
ins
)
{
return
ins
->
name
()
==
name
;
});
}
}
inline
auto
arg
(
std
::
size_t
i
)
inline
auto
arg
(
std
::
size_t
i
)
...
...
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