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
570b1c6b
Commit
570b1c6b
authored
Sep 23, 2018
by
Paul
Browse files
Formatting
parent
dc354856
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/include/migraph/matcher.hpp
src/include/migraph/matcher.hpp
+9
-7
No files found.
src/include/migraph/matcher.hpp
View file @
570b1c6b
...
...
@@ -57,12 +57,13 @@ function_matcher<F> make_function_matcher(F f)
template
<
class
M
>
auto
bind_match
(
M
m
,
std
::
string
name
)
{
return
make_function_matcher
([
=
,
name
=
std
::
move
(
name
)](
matcher_context
&
ctx
,
instruction_ref
ins
)
{
auto
result
=
m
.
match
(
ctx
,
ins
);
if
(
result
!=
ctx
.
not_found
())
ctx
.
instructions
.
emplace
(
name
,
ins
);
return
result
;
});
return
make_function_matcher
(
[
=
,
name
=
std
::
move
(
name
)
](
matcher_context
&
ctx
,
instruction_ref
ins
)
{
auto
result
=
m
.
match
(
ctx
,
ins
);
if
(
result
!=
ctx
.
not_found
())
ctx
.
instructions
.
emplace
(
name
,
ins
);
return
result
;
});
}
template
<
class
M
>
...
...
@@ -249,7 +250,8 @@ MIGRAPH_PRED_MATCHER(standard_shape, instruction_ref ins) { return ins->get_shap
inline
auto
name
(
std
::
string
name
)
{
return
make_basic_pred_matcher
([
=
,
name
=
std
::
move
(
name
)](
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
)
...
...
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