Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
eb8ebccc
Commit
eb8ebccc
authored
Mar 11, 2016
by
Matthieu Schaller
Browse files
task_type_psort --> task_type_part_sort
parent
74bca7ae
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/engine.c
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
);
...
...
src/runner.c
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
:
...
...
src/scheduler.c
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
))
{
...
...
src/space.c
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++)
...
...
src/task.c
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
;
...
...
src/task.h
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
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment