Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
53edc0bb
Commit
53edc0bb
authored
Jul 03, 2019
by
Paul
Browse files
Fix tidy error
parent
9ca52537
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
src/include/migraphx/matcher.hpp
src/include/migraphx/matcher.hpp
+11
-5
No files found.
src/include/migraphx/matcher.hpp
View file @
53edc0bb
...
@@ -269,6 +269,14 @@ struct match_fold_f
...
@@ -269,6 +269,14 @@ struct match_fold_f
return
fold
([
&
](
auto
x
,
auto
y
)
{
return
op
(
always
(
x
),
matched
(
y
));
})(
Start
,
ms
...);
return
fold
([
&
](
auto
x
,
auto
y
)
{
return
op
(
always
(
x
),
matched
(
y
));
})(
Start
,
ms
...);
}
}
template
<
class
Pack
>
static
bool
fold_matchers_pack
(
matcher_context
&
ctx
,
instruction_ref
ins
,
Pack
p
)
{
return
p
([
&
](
auto
...
ms
)
{
return
match_fold_f
::
fold_matchers
(
ctx
,
ins
,
ms
...);
});
}
template
<
class
...
Ts
>
template
<
class
...
Ts
>
auto
operator
()(
Ts
...
ms
)
const
auto
operator
()(
Ts
...
ms
)
const
{
{
...
@@ -283,17 +291,15 @@ struct match_fold_f
...
@@ -283,17 +291,15 @@ struct match_fold_f
template
<
class
Selector
>
template
<
class
Selector
>
auto
operator
[](
Selector
select
)
const
auto
operator
[](
Selector
select
)
const
{
{
return
[
=
](
auto
...
m
ms
)
{
return
[
=
](
auto
...
ms
)
{
// Workaround ICE on gcc by packing matchers into an object
// Workaround ICE on gcc by packing matchers into an object
auto
mpack
=
pack
(
m
ms
...);
auto
mpack
=
pack
(
ms
...);
return
make_bf_matcher
([
=
](
matcher_context
&
ctx
,
instruction_ref
start
)
{
return
make_bf_matcher
([
=
](
matcher_context
&
ctx
,
instruction_ref
start
)
{
Op
op
;
Op
op
;
bool
matches
=
Start
;
bool
matches
=
Start
;
select
(
start
,
[
&
](
auto
ins
)
{
select
(
start
,
[
&
](
auto
ins
)
{
auto
fm
=
[
&
]
{
auto
fm
=
[
&
]
{
return
mpack
([
&
](
auto
...
ms
)
{
return
match_fold_f
::
fold_matchers_pack
(
ctx
,
ins
,
mpack
);
return
match_fold_f
::
fold_matchers
(
ctx
,
ins
,
ms
...);
});
};
};
matches
=
op
(
always
(
matches
),
fm
);
matches
=
op
(
always
(
matches
),
fm
);
});
});
...
...
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