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
64a26385
Commit
64a26385
authored
8 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
ran format.sh.
parent
6244a776
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!273
Lean tasks
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/scheduler.c
+7
-9
7 additions, 9 deletions
src/scheduler.c
src/task.h
+2
-2
2 additions, 2 deletions
src/task.h
with
9 additions
and
11 deletions
src/scheduler.c
+
7
−
9
View file @
64a26385
...
@@ -930,32 +930,30 @@ void scheduler_reweight(struct scheduler *s, int verbose) {
...
@@ -930,32 +930,30 @@ void scheduler_reweight(struct scheduler *s, int verbose) {
switch
(
t
->
type
)
{
switch
(
t
->
type
)
{
case
task_type_sort
:
case
task_type_sort
:
cost
=
wscale
*
intrinsics_popcount
(
t
->
flags
)
*
t
->
ci
->
count
*
cost
=
wscale
*
intrinsics_popcount
(
t
->
flags
)
*
t
->
ci
->
count
*
(
sizeof
(
int
)
*
8
-
intrinsics_clz
(
t
->
ci
->
count
));
(
sizeof
(
int
)
*
8
-
intrinsics_clz
(
t
->
ci
->
count
));
break
;
break
;
case
task_type_self
:
case
task_type_self
:
cost
=
1
*
wscale
*
t
->
ci
->
count
*
t
->
ci
->
count
;
cost
=
1
*
wscale
*
t
->
ci
->
count
*
t
->
ci
->
count
;
break
;
break
;
case
task_type_pair
:
case
task_type_pair
:
if
(
t
->
ci
->
nodeID
!=
nodeID
||
t
->
cj
->
nodeID
!=
nodeID
)
if
(
t
->
ci
->
nodeID
!=
nodeID
||
t
->
cj
->
nodeID
!=
nodeID
)
cost
=
cost
=
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
else
else
cost
=
cost
=
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
break
;
break
;
case
task_type_sub_pair
:
case
task_type_sub_pair
:
if
(
t
->
ci
->
nodeID
!=
nodeID
||
t
->
cj
->
nodeID
!=
nodeID
)
{
if
(
t
->
ci
->
nodeID
!=
nodeID
||
t
->
cj
->
nodeID
!=
nodeID
)
{
if
(
t
->
flags
<
0
)
if
(
t
->
flags
<
0
)
cost
=
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
;
cost
=
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
;
else
else
cost
=
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
cost
=
sid_scale
[
t
->
flags
];
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
}
else
{
}
else
{
if
(
t
->
flags
<
0
)
if
(
t
->
flags
<
0
)
cost
=
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
;
cost
=
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
;
else
else
cost
=
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
cost
=
sid_scale
[
t
->
flags
];
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
}
}
break
;
break
;
case
task_type_sub_self
:
case
task_type_sub_self
:
...
...
This diff is collapsed.
Click to expand it.
src/task.h
+
2
−
2
View file @
64a26385
...
@@ -123,7 +123,7 @@ struct task {
...
@@ -123,7 +123,7 @@ struct task {
/*! Weight of the task */
/*! Weight of the task */
int
weight
;
int
weight
;
#if defined(WITH_MPI) && defined(HAVE_METIS)
#if defined(WITH_MPI) && defined(HAVE_METIS)
/*! Individual cost estimate for this task. */
/*! Individual cost estimate for this task. */
int
cost
;
int
cost
;
...
@@ -149,7 +149,7 @@ struct task {
...
@@ -149,7 +149,7 @@ struct task {
/*! Is this task implicit (i.e. does not do anything) ? */
/*! Is this task implicit (i.e. does not do anything) ? */
char
implicit
;
char
implicit
;
#ifdef SWIFT_DEBUG_TASKS
#ifdef SWIFT_DEBUG_TASKS
/*! ID of the queue or runner owning this task */
/*! ID of the queue or runner owning this task */
short
int
rid
;
short
int
rid
;
...
...
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