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
850b9a19
Commit
850b9a19
authored
Jan 22, 2017
by
James Willis
Browse files
Added statistics to runner_self1_vec to find the total number of interactions.
parent
61314f0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/runner_doiact_vec.c
View file @
850b9a19
...
...
@@ -304,6 +304,8 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
int
count_align
;
int
num_vec_proc
=
NUM_VEC_PROC
;
int
intCount
=
0
;
struct
part
*
restrict
parts
=
c
->
parts
;
const
int
count
=
c
->
count
;
...
...
@@ -526,10 +528,14 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
VEC_HADD
(
curlvySum
,
pi
->
density
.
rot_v
[
1
]);
VEC_HADD
(
curlvzSum
,
pi
->
density
.
rot_v
[
2
]);
intCount
+=
icount
;
/* Reset interaction count. */
icount
=
0
;
}
/* loop over all particles. */
message
(
"Total number of self interactions: %d, average per particle: %f."
,
intCount
,
((
float
)
intCount
)
/
((
float
)
count
));
TIMER_TOC
(
timer_doself_density
);
#endif
/* WITH_VECTORIZATION */
}
...
...
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