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
eb8ebccc
Commit
eb8ebccc
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
task_type_psort --> task_type_part_sort
parent
74bca7ae
No related branches found
No related tags found
1 merge request
!128
Parallel gpart sort
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
src/engine.c
+2
-2
2 additions, 2 deletions
src/engine.c
src/runner.c
+1
-1
1 addition, 1 deletion
src/runner.c
src/scheduler.c
+1
-1
1 addition, 1 deletion
src/scheduler.c
src/space.c
+1
-1
1 addition, 1 deletion
src/space.c
src/task.c
+4
-3
4 additions, 3 deletions
src/task.c
src/task.h
+2
-1
2 additions, 1 deletion
src/task.h
with
11 additions
and
9 deletions
src/engine.c
+
2
−
2
View file @
eb8ebccc
...
...
@@ -755,7 +755,7 @@ void engine_maketasks(struct engine *e) {
/* Add the space sorting tasks. */
for
(
int
i
=
0
;
i
<
e
->
nr_threads
;
i
++
)
scheduler_addtask
(
sched
,
task_type_psort
,
task_subtype_none
,
i
,
0
,
NULL
,
scheduler_addtask
(
sched
,
task_type_p
art_
sort
,
task_subtype_none
,
i
,
0
,
NULL
,
NULL
,
0
);
/* Run through the highest level of cells and add pairs. */
...
...
@@ -2050,7 +2050,7 @@ void engine_init(struct engine *e, struct space *s, float dt, int nr_threads,
/* Create the sorting tasks. */
for
(
int
i
=
0
;
i
<
e
->
nr_threads
;
i
++
)
scheduler_addtask
(
&
e
->
sched
,
task_type_psort
,
task_subtype_none
,
i
,
0
,
NULL
,
scheduler_addtask
(
&
e
->
sched
,
task_type_p
art_
sort
,
task_subtype_none
,
i
,
0
,
NULL
,
NULL
,
0
);
scheduler_ranktasks
(
&
e
->
sched
);
...
...
This diff is collapsed.
Click to expand it.
src/runner.c
+
1
−
1
View file @
eb8ebccc
...
...
@@ -1057,7 +1057,7 @@ void *runner_main(void *data) {
case
task_type_grav_down
:
runner_dograv_down
(
r
,
t
->
ci
);
break
;
case
task_type_psort
:
case
task_type_p
art_
sort
:
space_do_parts_sort
();
break
;
case
task_type_split_cell
:
...
...
This diff is collapsed.
Click to expand it.
src/scheduler.c
+
1
−
1
View file @
eb8ebccc
...
...
@@ -127,7 +127,7 @@ void scheduler_splittasks(struct scheduler *s) {
}
/* Skip sorting tasks. */
if
(
t
->
type
==
task_type_psort
)
continue
;
if
(
t
->
type
==
task_type_p
art_
sort
)
continue
;
/* Empty task? */
if
(
t
->
ci
==
NULL
||
(
t
->
type
==
task_type_pair
&&
t
->
cj
==
NULL
))
{
...
...
This diff is collapsed.
Click to expand it.
src/space.c
+
1
−
1
View file @
eb8ebccc
...
...
@@ -582,7 +582,7 @@ void space_parts_sort(struct space *s, size_t *ind, size_t N, int min, int max,
space_sort_struct
.
waiting
=
1
;
/* Launch the sorting tasks. */
engine_launch
(
s
->
e
,
s
->
e
->
nr_threads
,
(
1
<<
task_type_psort
),
0
);
engine_launch
(
s
->
e
,
s
->
e
->
nr_threads
,
(
1
<<
task_type_p
art_
sort
),
0
);
/* Verify space_sort_struct. */
/* for (int i = 1; i < N; i++)
...
...
This diff is collapsed.
Click to expand it.
src/task.c
+
4
−
3
View file @
eb8ebccc
...
...
@@ -45,7 +45,8 @@
const
char
*
taskID_names
[
task_type_count
]
=
{
"none"
,
"sort"
,
"self"
,
"pair"
,
"sub"
,
"init"
,
"ghost"
,
"drift"
,
"kick"
,
"send"
,
"recv"
,
"grav_pp"
,
"grav_mm"
,
"grav_up"
,
"grav_down"
,
"psort"
,
"split_cell"
,
"rewait"
};
"grav_mm"
,
"grav_up"
,
"grav_down"
,
"part_sort"
,
"gpart_sort"
,
"split_cell"
,
"rewait"
};
const
char
*
subtaskID_names
[
task_type_count
]
=
{
"none"
,
"density"
,
"force"
,
"grav"
};
...
...
@@ -78,9 +79,9 @@ float task_overlap(const struct task *ta, const struct task *tb) {
/* First check if any of the two tasks are of a type that don't
use cells. */
if
(
ta
==
NULL
||
tb
==
NULL
||
ta
->
type
==
task_type_none
||
ta
->
type
==
task_type_psort
||
ta
->
type
==
task_type_split_cell
||
ta
->
type
==
task_type_p
art_
sort
||
ta
->
type
==
task_type_split_cell
||
ta
->
type
==
task_type_rewait
||
tb
->
type
==
task_type_none
||
tb
->
type
==
task_type_psort
||
tb
->
type
==
task_type_split_cell
||
tb
->
type
==
task_type_p
art_
sort
||
tb
->
type
==
task_type_split_cell
||
tb
->
type
==
task_type_rewait
)
return
0
.
0
f
;
...
...
This diff is collapsed.
Click to expand it.
src/task.h
+
2
−
1
View file @
eb8ebccc
...
...
@@ -45,7 +45,8 @@ enum task_types {
task_type_grav_mm
,
task_type_grav_up
,
task_type_grav_down
,
task_type_psort
,
task_type_part_sort
,
task_type_gpart_sort
,
task_type_split_cell
,
task_type_rewait
,
task_type_count
...
...
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