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
c08e12fc
Commit
c08e12fc
authored
3 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Apply the changes to the h_min/h_max recursion based on integer depth to the star loops as well
parent
fe07bb95
No related branches found
No related tags found
1 merge request
!1353
Draft: Subtask speedup - Still requires work
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner_doiact_functions_stars.h
+16
-4
16 additions, 4 deletions
src/runner_doiact_functions_stars.h
with
16 additions
and
4 deletions
src/runner_doiact_functions_stars.h
+
16
−
4
View file @
c08e12fc
...
@@ -388,8 +388,8 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
...
@@ -388,8 +388,8 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
#ifdef SWIFT_DEBUG_CHECKS
#ifdef SWIFT_DEBUG_CHECKS
/* Get the limits in h (if any) */
/* Get the limits in h (if any) */
const
float
h_min
=
limit_min_h
?
ci
->
h_min_allowed
:
0
.;
const
float
h_min
=
limit_min_h
?
ci
->
h_min_allowed
:
0
.;
const
float
h_max
=
limit_max_h
?
ci
->
h_max_allowed
:
FLT_MAX
;
#endif
#endif
const
float
h_max
=
limit_max_h
?
ci
->
h_max_allowed
:
FLT_MAX
;
if
(
do_ci_stars
)
{
if
(
do_ci_stars
)
{
...
@@ -519,6 +519,12 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
...
@@ -519,6 +519,12 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
/* Hit or miss? */
/* Hit or miss? */
if
(
r2
<
hig2
&&
spi_active_feedback
)
{
if
(
r2
<
hig2
&&
spi_active_feedback
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
hi
<
h_min
||
hi
>=
h_max
)
error
(
"Inappropriate h for this level!"
);
#endif
IACT_STARS
(
r2
,
dx
,
hi
,
hj
,
spi
,
pj
,
a
,
H
);
IACT_STARS
(
r2
,
dx
,
hi
,
hj
,
spi
,
pj
,
a
,
H
);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
...
@@ -581,6 +587,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
...
@@ -581,6 +587,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
/* Get a hold of the jth part in cj. */
/* Get a hold of the jth part in cj. */
struct
spart
*
spj
=
&
sparts_j
[
sort_j
[
pjd
].
i
];
struct
spart
*
spj
=
&
sparts_j
[
sort_j
[
pjd
].
i
];
const
char
depth_j
=
spj
->
depth_h
;
const
float
hj
=
spj
->
h
;
const
float
hj
=
spj
->
h
;
/* Skip inhibited particles */
/* Skip inhibited particles */
...
@@ -590,7 +597,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
...
@@ -590,7 +597,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
if
(
!
spart_is_active
(
spj
,
e
))
continue
;
if
(
!
spart_is_active
(
spj
,
e
))
continue
;
/* Skip inactive particles */
/* Skip inactive particles */
int
spj_active_feedback
=
feedback_is_active
(
spj
,
e
);
const
int
spj_active_feedback
=
feedback_is_active
(
spj
,
e
);
if
(
!
spj_active_feedback
&&
!
with_rt
)
continue
;
if
(
!
spj_active_feedback
&&
!
with_rt
)
continue
;
#ifdef SWIFT_DEBUG_CHECKS
#ifdef SWIFT_DEBUG_CHECKS
...
@@ -599,8 +606,8 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
...
@@ -599,8 +606,8 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
#endif
#endif
/* Skip particles not in the range of h we care about */
/* Skip particles not in the range of h we care about */
if
(
hj
>=
h_max
)
continue
;
if
(
depth_j
>
max_depth
)
continue
;
if
(
h
j
<
h_
min
)
continue
;
if
(
depth_
j
<
min
_depth
)
continue
;
/* Is there anything we need to interact with ? */
/* Is there anything we need to interact with ? */
const
double
dj
=
sort_j
[
pjd
].
d
-
hj
*
kernel_gamma
-
dx_max
+
rshift
;
const
double
dj
=
sort_j
[
pjd
].
d
-
hj
*
kernel_gamma
-
dx_max
+
rshift
;
...
@@ -670,6 +677,11 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
...
@@ -670,6 +677,11 @@ void DO_SYM_PAIR1_STARS(struct runner *r, const struct cell *restrict ci,
/* Hit or miss? */
/* Hit or miss? */
if
(
r2
<
hjg2
&&
spj_active_feedback
)
{
if
(
r2
<
hjg2
&&
spj_active_feedback
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
hj
<
h_min
||
hj
>=
h_max
)
error
(
"Inappropriate h for this level!"
);
#endif
IACT_STARS
(
r2
,
dx
,
hj
,
hi
,
spj
,
pi
,
a
,
H
);
IACT_STARS
(
r2
,
dx
,
hj
,
hi
,
spj
,
pi
,
a
,
H
);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
...
...
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