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
7bae3d04
Commit
7bae3d04
authored
11 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
make superfluous sorts implicit or skip them alltogether.
Former-commit-id: 95f9b781749d85eb1fd337283da3115428304f11
parent
101250b2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cell.h
+1
-1
1 addition, 1 deletion
src/cell.h
src/engine.c
+17
-4
17 additions, 4 deletions
src/engine.c
src/scheduler.c
+13
-12
13 additions, 12 deletions
src/scheduler.c
with
31 additions
and
17 deletions
src/cell.h
+
1
−
1
View file @
7bae3d04
...
...
@@ -65,7 +65,7 @@ struct cell {
/* Pointers for the sorted indices. */
struct
entry
*
sort
;
int
sorted
;
unsigned
int
sorted
;
/* Number of pairs associated with this cell. */
// int nr_pairs;
...
...
This diff is collapsed.
Click to expand it.
src/engine.c
+
17
−
4
View file @
7bae3d04
...
...
@@ -269,6 +269,15 @@ int engine_marktasks ( struct engine *e ) {
return
1
;
}
/* Sort? */
else
if
(
t
->
type
==
task_type_sort
)
{
/* If all the sorts have been done, make this task implicit. */
if
(
!
(
t
->
flags
&
(
t
->
flags
^
t
->
ci
->
sorted
)
)
)
t
->
implicit
=
1
;
}
}
...
...
@@ -320,10 +329,14 @@ int engine_marktasks ( struct engine *e ) {
/* Set the sort flags. */
if
(
!
t
->
skip
&&
t
->
type
==
task_type_pair
)
{
ci
->
sorts
->
flags
|=
(
1
<<
t
->
flags
);
ci
->
sorts
->
skip
=
0
;
cj
->
sorts
->
flags
|=
(
1
<<
t
->
flags
);
cj
->
sorts
->
skip
=
0
;
if
(
!
(
ci
->
sorted
&
(
1
<<
t
->
flags
)
)
)
{
ci
->
sorts
->
flags
|=
(
1
<<
t
->
flags
);
ci
->
sorts
->
skip
=
0
;
}
if
(
!
(
cj
->
sorted
&
(
1
<<
t
->
flags
)
)
)
{
cj
->
sorts
->
flags
|=
(
1
<<
t
->
flags
);
cj
->
sorts
->
skip
=
0
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/scheduler.c
+
13
−
12
View file @
7bae3d04
...
...
@@ -692,18 +692,19 @@ void scheduler_done ( struct scheduler *s , struct task *t ) {
struct
task
*
t2
;
/* Release whatever locks this task held. */
switch
(
t
->
type
)
{
case
task_type_self
:
case
task_type_sort
:
cell_unlocktree
(
t
->
ci
);
break
;
case
task_type_pair
:
case
task_type_sub
:
cell_unlocktree
(
t
->
ci
);
if
(
t
->
cj
!=
NULL
)
cell_unlocktree
(
t
->
cj
);
break
;
}
if
(
!
t
->
implicit
)
switch
(
t
->
type
)
{
case
task_type_self
:
case
task_type_sort
:
cell_unlocktree
(
t
->
ci
);
break
;
case
task_type_pair
:
case
task_type_sub
:
cell_unlocktree
(
t
->
ci
);
if
(
t
->
cj
!=
NULL
)
cell_unlocktree
(
t
->
cj
);
break
;
}
/* Loop through the dependencies and add them to a queue if
they are ready. */
...
...
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