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
7c8e1979
Commit
7c8e1979
authored
Jul 02, 2019
by
Paul
Browse files
Formatting
parent
3cb4edfe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
src/include/migraphx/functional.hpp
src/include/migraphx/functional.hpp
+2
-2
src/include/migraphx/matcher.hpp
src/include/migraphx/matcher.hpp
+2
-4
No files found.
src/include/migraphx/functional.hpp
View file @
7c8e1979
...
@@ -190,11 +190,11 @@ auto pop_back_args(Ts&&... xs)
...
@@ -190,11 +190,11 @@ auto pop_back_args(Ts&&... xs)
};
};
}
}
template
<
class
T
>
template
<
class
T
>
struct
always_f
struct
always_f
{
{
T
x
;
T
x
;
template
<
class
...
Ts
>
template
<
class
...
Ts
>
constexpr
T
operator
()(
Ts
&&
...)
const
constexpr
T
operator
()(
Ts
&&
...)
const
{
{
return
x
;
return
x
;
...
...
src/include/migraphx/matcher.hpp
View file @
7c8e1979
...
@@ -261,16 +261,14 @@ struct lazy_or
...
@@ -261,16 +261,14 @@ struct lazy_or
template
<
class
Op
,
bool
Start
,
bool
Matches
>
template
<
class
Op
,
bool
Start
,
bool
Matches
>
struct
folder
struct
folder
{
{
template
<
class
...
Ms
>
template
<
class
...
Ms
>
static
bool
fold_match
(
matcher_context
&
ctx
,
instruction_ref
ins
,
Ms
...
ms
)
static
bool
fold_match
(
matcher_context
&
ctx
,
instruction_ref
ins
,
Ms
...
ms
)
{
{
Op
op
;
Op
op
;
auto
matched
=
[
&
](
auto
m
)
{
return
[
&
]
{
return
ctx
.
matched
(
m
,
ins
);
};
};
auto
matched
=
[
&
](
auto
m
)
{
return
[
&
]
{
return
ctx
.
matched
(
m
,
ins
);
};
};
return
return
fold
([
&
](
auto
x
,
auto
y
)
{
return
op
(
always
(
x
),
matched
(
y
));
})(
Start
,
ms
...);
fold
([
&
](
auto
x
,
auto
y
)
{
return
op
(
always
(
x
),
matched
(
y
));
})(
Start
,
ms
...);
}
}
template
<
class
...
Ts
>
template
<
class
...
Ts
>
auto
operator
()(
Ts
...
ms
)
const
auto
operator
()(
Ts
...
ms
)
const
{
{
...
...
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