Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
cb84726b
Commit
cb84726b
authored
8 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
sub cells should wait until sort tasks of their cells are finished.
parent
7b8654d4
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!327
Rebuild criteria
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheduler.c
+12
-0
12 additions, 0 deletions
src/scheduler.c
with
12 additions
and
0 deletions
src/scheduler.c
+
12
−
0
View file @
cb84726b
...
...
@@ -64,6 +64,11 @@ void scheduler_clear_active(struct scheduler *s) { s->active_count = 0; }
*/
void
scheduler_addunlock
(
struct
scheduler
*
s
,
struct
task
*
ta
,
struct
task
*
tb
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
ta
==
NULL
)
error
(
"Unlocking task is NULL."
);
if
(
tb
==
NULL
)
error
(
"Unlocked task is NULL."
);
#endif
/* Get an index at which to store this unlock. */
const
int
ind
=
atomic_inc
(
&
s
->
nr_unlocks
);
...
...
@@ -168,6 +173,9 @@ static void scheduler_splittask(struct task *t, struct scheduler *s) {
/* convert to a self-subtask. */
t
->
type
=
task_type_sub_self
;
/* Depend on local sorts on this cell. */
if
(
ci
->
sorts
!=
NULL
)
scheduler_addunlock
(
s
,
ci
->
sorts
,
t
);
/* Otherwise, make tasks explicitly. */
}
else
{
...
...
@@ -234,6 +242,10 @@ static void scheduler_splittask(struct task *t, struct scheduler *s) {
/* Make this task a sub task. */
t
->
type
=
task_type_sub_pair
;
/* Depend on the sort tasks of both cells. */
if
(
ci
->
sorts
!=
NULL
)
scheduler_addunlock
(
s
,
ci
->
sorts
,
t
);
if
(
cj
->
sorts
!=
NULL
)
scheduler_addunlock
(
s
,
cj
->
sorts
,
t
);
/* Otherwise, split it. */
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment