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
298cc01b
Commit
298cc01b
authored
9 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
use larger chunks for scheduler_splittasks, and don't init scheduler_ranktasks in parallel.
parent
d3624d5d
No related branches found
No related tags found
1 merge request
!176
Tasks cleanup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheduler.c
+11
-3
11 additions, 3 deletions
src/scheduler.c
with
11 additions
and
3 deletions
src/scheduler.c
+
11
−
3
View file @
298cc01b
...
@@ -634,7 +634,7 @@ void scheduler_splittasks(struct scheduler *s) {
...
@@ -634,7 +634,7 @@ void scheduler_splittasks(struct scheduler *s) {
/* Call the mapper on each current task. */
/* Call the mapper on each current task. */
threadpool_map
(
s
->
threadpool
,
scheduler_splittasks_mapper
,
s
->
tasks
,
threadpool_map
(
s
->
threadpool
,
scheduler_splittasks_mapper
,
s
->
tasks
,
s
->
nr_tasks
,
sizeof
(
struct
task
),
1
,
s
);
s
->
nr_tasks
,
sizeof
(
struct
task
),
1
000
,
s
);
}
}
/**
/**
...
@@ -791,8 +791,16 @@ void scheduler_ranktasks(struct scheduler *s) {
...
@@ -791,8 +791,16 @@ void scheduler_ranktasks(struct scheduler *s) {
const
int
nr_tasks
=
s
->
nr_tasks
;
const
int
nr_tasks
=
s
->
nr_tasks
;
/* Run through the tasks and get all the waits right. */
/* Run through the tasks and get all the waits right. */
threadpool_map
(
s
->
threadpool
,
scheduler_simple_rewait_mapper
,
tasks
,
nr_tasks
,
/* threadpool_map(s->threadpool, scheduler_simple_rewait_mapper, tasks, nr_tasks,
sizeof
(
struct
task
),
1000
,
NULL
);
sizeof(struct task), 1000, NULL); */
for
(
int
i
=
0
;
i
<
nr_tasks
;
i
++
)
{
struct
task
*
t
=
&
tasks
[
i
];
// Increment the waits of the dependances
for
(
int
k
=
0
;
k
<
t
->
nr_unlock_tasks
;
k
++
)
{
t
->
unlock_tasks
[
k
]
->
wait
++
;
}
}
/* Load the tids of tasks with no waits. */
/* Load the tids of tasks with no waits. */
int
left
=
0
;
int
left
=
0
;
...
...
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