Skip to content
Snippets Groups Projects
Commit 0d848b57 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

Made a number of changes to this file:

* Re-formatted using "clang-format --style=Google" and tidied-up the output
  a bit, e.g. comment formatting.

* Changed the particle traversal loops from while-loops to for-loops, as this
  makes things a bit more compact and clearer, except for the main legacy
  walk in which the while loop makes sense.

* Changed legacy_interact and interact_exact to use local copies of the data
  of the target particle. The array/pointer dereferencing will not be
  optimized out by most compilers since we don't know, a priori, if anybody
  else will be accessing that memory, or if pointers overlap.

* Use local data in the comp_com routines, though these are so cheap that
  it doesn't make much of a difference.

I used ICHECK to verify that the number of interactions was more or less
consistent between the new and legacy runs. Matthieu: Can you have a closer
look to make sure I didn't break anything?
parent 64f82b8e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment