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
bbe9d22c
Commit
bbe9d22c
authored
Mar 05, 2019
by
Paul
Browse files
Formatting
parent
32970359
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/schedule.cpp
src/schedule.cpp
+6
-5
No files found.
src/schedule.cpp
View file @
bbe9d22c
...
...
@@ -270,17 +270,18 @@ void schedule::apply(program& p) const
assert
(
stream
<
model
.
concurrency
());
model
.
schedule_instruction
(
p
,
ins
,
stream
);
// Clear waits when switching streams
if
(
stream
!=
waited_on
)
if
(
stream
!=
waited_on
)
waited_for
.
clear
();
// Schedule wait instruction
if
(
si
.
is_merge_point
(
ins
,
stream
))
{
auto
wait_for
=
si
.
wait_for
(
ins
);
// Dont wait for streams that have already been waited for
wait_for
.
erase
(
std
::
remove_if
(
wait_for
.
begin
(),
wait_for
.
end
(),
[
&
](
auto
x
)
{
return
waited_for
.
count
(
x
)
>
0
;
}),
wait_for
.
end
());
if
(
not
wait_for
.
empty
())
wait_for
.
erase
(
std
::
remove_if
(
wait_for
.
begin
(),
wait_for
.
end
(),
[
&
](
auto
x
)
{
return
waited_for
.
count
(
x
)
>
0
;
}),
wait_for
.
end
());
if
(
not
wait_for
.
empty
())
model
.
wait
(
p
,
ins
,
stream
,
wait_for
);
waited_for
.
insert
(
wait_for
.
begin
(),
wait_for
.
end
());
waited_on
=
stream
;
...
...
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