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
5387920b
Commit
5387920b
authored
Apr 30, 2019
by
Paul
Browse files
Formatting
parent
f0a16e67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/instruction.cpp
src/instruction.cpp
+7
-7
No files found.
src/instruction.cpp
View file @
5387920b
...
@@ -168,11 +168,10 @@ bool instruction::can_eval() const
...
@@ -168,11 +168,10 @@ bool instruction::can_eval() const
{
{
return
true
;
return
true
;
}
}
else
if
(
is_context_free
(
op
))
else
if
(
is_context_free
(
op
))
{
{
return
std
::
all_of
(
this
->
inputs
().
begin
(),
this
->
inputs
().
end
(),
[](
auto
arg
)
{
return
std
::
all_of
(
return
arg
->
can_eval
();
this
->
inputs
().
begin
(),
this
->
inputs
().
end
(),
[](
auto
arg
)
{
return
arg
->
can_eval
();
});
});
}
}
else
else
{
{
...
@@ -189,9 +188,10 @@ argument instruction::eval() const
...
@@ -189,9 +188,10 @@ argument instruction::eval() const
if
(
is_context_free
(
op
)
and
this
->
can_eval
())
if
(
is_context_free
(
op
)
and
this
->
can_eval
())
{
{
std
::
vector
<
argument
>
args
;
std
::
vector
<
argument
>
args
;
std
::
transform
(
this
->
inputs
().
begin
(),
this
->
inputs
().
end
(),
std
::
back_inserter
(
args
),
[](
auto
arg
)
{
std
::
transform
(
this
->
inputs
().
begin
(),
return
arg
->
eval
();
this
->
inputs
().
end
(),
});
std
::
back_inserter
(
args
),
[](
auto
arg
)
{
return
arg
->
eval
();
});
return
op
.
compute
(
result
,
args
);
return
op
.
compute
(
result
,
args
);
}
}
return
{};
return
{};
...
...
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