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
6d348981
Commit
6d348981
authored
Jul 03, 2019
by
Paul
Browse files
Improve names
parent
cac345d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/include/migraphx/matcher.hpp
src/include/migraphx/matcher.hpp
+7
-7
No files found.
src/include/migraphx/matcher.hpp
View file @
6d348981
...
...
@@ -259,10 +259,10 @@ struct lazy_or
};
template
<
class
Op
,
bool
Start
,
bool
Matches
>
struct
fold
er
struct
match_
fold
_f
{
template
<
class
...
Ms
>
static
bool
fold_match
(
matcher_context
&
ctx
,
instruction_ref
ins
,
Ms
...
ms
)
static
bool
fold_match
ers
(
matcher_context
&
ctx
,
instruction_ref
ins
,
Ms
...
ms
)
{
Op
op
;
auto
matched
=
[
&
](
auto
m
)
{
return
[
&
]
{
return
ctx
.
matched
(
m
,
ins
);
};
};
...
...
@@ -273,7 +273,7 @@ struct folder
auto
operator
()(
Ts
...
ms
)
const
{
return
make_bf_matcher
([
=
](
matcher_context
&
ctx
,
instruction_ref
ins
)
{
bool
matches
=
fold
er
::
fold_match
(
ctx
,
ins
,
ms
...);
bool
matches
=
match_
fold
_f
::
fold_match
ers
(
ctx
,
ins
,
ms
...);
if
(
matches
==
Matches
)
return
ins
;
return
ctx
.
not_found
();
...
...
@@ -292,7 +292,7 @@ struct folder
select
(
start
,
[
&
](
auto
ins
)
{
auto
fm
=
[
&
]
{
return
mpack
(
[
&
](
auto
...
ms
)
{
return
fold
er
::
fold_match
(
ctx
,
ins
,
ms
...);
});
[
&
](
auto
...
ms
)
{
return
match_
fold
_f
::
fold_match
ers
(
ctx
,
ins
,
ms
...);
});
};
matches
=
op
(
always
(
matches
),
fm
);
});
...
...
@@ -304,9 +304,9 @@ struct folder
}
};
const
constexpr
auto
all_of
=
fold
er
<
lazy_and
,
true
,
true
>
{};
const
constexpr
auto
any_of
=
fold
er
<
lazy_or
,
false
,
true
>
{};
const
constexpr
auto
none_of
=
fold
er
<
lazy_or
,
false
,
false
>
{};
const
constexpr
auto
all_of
=
match_
fold
_f
<
lazy_and
,
true
,
true
>
{};
const
constexpr
auto
any_of
=
match_
fold
_f
<
lazy_or
,
false
,
true
>
{};
const
constexpr
auto
none_of
=
match_
fold
_f
<
lazy_or
,
false
,
false
>
{};
inline
auto
inputs
()
{
...
...
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