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
1e695904
Commit
1e695904
authored
3 years ago
by
Bert Vandenbroucke
Browse files
Options
Downloads
Patches
Plain Diff
Use split symmetric pair task for split cells in DOSUB_SELF1_STARS.
parent
b8deeb16
No related branches found
No related tags found
1 merge request
!1454
Split stars density self and ghost tasks to reduce dead time.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner_doiact_functions_stars.h
+17
-6
17 additions, 6 deletions
src/runner_doiact_functions_stars.h
with
17 additions
and
6 deletions
src/runner_doiact_functions_stars.h
+
17
−
6
View file @
1e695904
...
...
@@ -281,7 +281,8 @@ void DO_NONSYM_PAIR1_STARS_NAIVE(struct runner *r, struct cell *restrict ci,
* @param shift The shift vector to apply to the particles in ci.
*/
void
DO_SYM_PAIR1_STARS
(
struct
runner
*
r
,
struct
cell
*
ci
,
struct
cell
*
cj
,
const
int
sid
,
const
double
*
shift
)
{
const
int
sid
,
const
double
*
shift
,
const
int
offset
,
const
int
increment
)
{
TIMER_TIC
;
...
...
@@ -355,6 +356,9 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
for
(
int
pid
=
count_i
-
1
;
pid
>=
0
&&
sort_i
[
pid
].
d
+
hi_max
+
dx_max
>
dj_min
;
pid
--
)
{
/* skip particles not handled by this split task */
if
((
sort_i
[
pid
].
i
-
offset
)
%
increment
!=
0
)
continue
;
/* Get a hold of the ith part in ci. */
struct
spart
*
restrict
spi
=
&
sparts_i
[
sort_i
[
pid
].
i
];
const
float
hi
=
spi
->
h
;
...
...
@@ -501,6 +505,9 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
for
(
int
pjd
=
0
;
pjd
<
count_j
&&
sort_j
[
pjd
].
d
-
hj_max
-
dx_max
<
di_max
;
pjd
++
)
{
/* skip particles not handled by this split task */
if
((
sort_j
[
pjd
].
i
-
offset
)
%
increment
!=
0
)
continue
;
/* Get a hold of the jth part in cj. */
struct
spart
*
spj
=
&
sparts_j
[
sort_j
[
pjd
].
i
];
const
float
hj
=
spj
->
h
;
...
...
@@ -1271,7 +1278,7 @@ void DOPAIR1_BRANCH_STARS(struct runner *r, struct cell *ci, struct cell *cj) {
#ifdef SWIFT_USE_NAIVE_INTERACTIONS_STARS
DOPAIR1_STARS_NAIVE
(
r
,
ci
,
cj
,
1
);
#else
DO_SYM_PAIR1_STARS
(
r
,
ci
,
cj
,
sid
,
shift
);
DO_SYM_PAIR1_STARS
(
r
,
ci
,
cj
,
sid
,
shift
,
0
,
1
);
#endif
}
...
...
@@ -1415,13 +1422,17 @@ void DOSUB_SELF1_STARS(struct runner *r, struct cell *ci, int gettimer,
if
(
increment
==
1
)
{
DOSUB_PAIR1_STARS
(
r
,
ci
->
progeny
[
k
],
ci
->
progeny
[
j
],
0
);
}
else
{
struct
cell
*
pci
=
ci
->
progeny
[
k
];
struct
cell
*
pcj
=
ci
->
progeny
[
j
];
double
shift
[
3
]
=
{
0
.
0
,
0
.
0
,
0
.
0
};
const
int
sid
=
space_getsid
(
r
->
e
->
s
,
&
pci
,
&
pcj
,
shift
);
/* there is (currently) no clever way to split symmetric pair
tasks, so we cannot recurse any further and have to do a naive
non-symmetric interaction that can be properly split */
DO_NONSYM_PAIR1_STARS_NAIVE
(
r
,
ci
->
progeny
[
k
],
ci
->
progeny
[
j
],
offset
,
increment
);
DO_NONSYM_PAIR1_STARS_NAIVE
(
r
,
ci
->
progeny
[
j
],
ci
->
progeny
[
k
],
offset
,
increment
);
DO_SYM_PAIR1_STARS
(
r
,
pci
,
pcj
,
sid
,
shift
,
offset
,
increment
);
}
}
}
...
...
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