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
b3575963
Commit
b3575963
authored
Aug 19, 2017
by
Matthieu Schaller
Browse files
Correct timers and documentation
parent
a26e112a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/gravity_cache.h
View file @
b3575963
...
...
@@ -132,12 +132,19 @@ static INLINE void gravity_cache_init(struct gravity_cache *c, int count) {
/**
* @brief Fills a #gravity_cache structure with some #gpart and shift them.
*
* Also checks whether the #gpart can use a M2P interaction instead of the
* more expensive P2P.
*
* @param max_active_bin The largest active bin in the current time-step.
* @param c The #gravity_cache to fill.
* @param gparts The #gpart array to read from.
* @param gcount The number of particles to read.
* @param gcount_padded The number of particle to read padded to the next
* multiple of the vector length.
* @param shift A shift to apply to all the particles.
* @param CoM The position of the multipole.
* @param r_max2 The square of the multipole radius.
* @param theta_crit2 The square of the opening angle.
*/
__attribute__
((
always_inline
))
INLINE
static
void
gravity_cache_populate
(
timebin_t
max_active_bin
,
struct
gravity_cache
*
c
,
...
...
@@ -192,6 +199,7 @@ __attribute__((always_inline)) INLINE static void gravity_cache_populate(
/**
* @brief Fills a #gravity_cache structure with some #gpart and shift them.
*
* @param max_active_bin The largest active bin in the current time-step.
* @param c The #gravity_cache to fill.
* @param gparts The #gpart array to read from.
* @param gcount The number of particles to read.
...
...
src/timers.c
View file @
b3575963
...
...
@@ -54,8 +54,9 @@ const char* timers_names[timer_count] = {
"dopair_density"
,
"dopair_gradient"
,
"dopair_force"
,
"dopair_grav_
pm
"
,
"dopair_grav_
branch
"
,
"dopair_grav_mm"
,
"dopair_grav_pm"
,
"dopair_grav_pp"
,
"dograv_external"
,
"dograv_down"
,
...
...
@@ -119,8 +120,9 @@ void timers_reset_all() { timers_reset(timers_mask_all); }
void
timers_print
(
int
step
)
{
fprintf
(
timers_file
,
"%d
\t
"
,
step
);
for
(
int
k
=
0
;
k
<
timer_count
;
k
++
)
fprintf
(
timers_file
,
"%.3f
\t
"
,
clocks_from_ticks
(
timers
[
k
]));
fprintf
(
timers_file
,
"%
18
.3f
"
,
clocks_from_ticks
(
timers
[
k
]));
fprintf
(
timers_file
,
"
\n
"
);
fflush
(
timers_file
);
}
/**
...
...
@@ -136,7 +138,7 @@ void timers_open_file(int rank) {
fprintf
(
timers_file
,
"# timers:
\n
# step | "
);
for
(
int
k
=
0
;
k
<
timer_count
;
k
++
)
fprintf
(
timers_file
,
"%
s
\t
"
,
timers_names
[
k
]);
fprintf
(
timers_file
,
"%
18s
"
,
timers_names
[
k
]);
fprintf
(
timers_file
,
"
\n
"
);
}
...
...
src/timers.h
View file @
b3575963
...
...
@@ -56,6 +56,7 @@ enum {
timer_dopair_gradient
,
timer_dopair_force
,
timer_dopair_grav_branch
,
timer_dopair_grav_mm
,
timer_dopair_grav_pm
,
timer_dopair_grav_pp
,
timer_dograv_external
,
...
...
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