Skip to content

Improve C++ - #17

Closed
isuruf wants to merge 2 commits into
paugier:masterfrom
isuruf:cxx
Closed

isuruf wants to merge 2 commits into
paugier:masterfrom
isuruf:cxx

Conversation

@isuruf

@isuruf isuruf commented Apr 26, 2021

Copy link
Copy Markdown
Contributor

No description provided.

@paugier

paugier commented Apr 26, 2021

Copy link
Copy Markdown
Owner

I really want to keep the "historical" version from nbabel.org (used by Zwart, 2020). Can you please improve main_opt.cpp or create a new file ?

@paugier

paugier commented Apr 29, 2021

Copy link
Copy Markdown
Owner

Thanks for your implementation. I included in https://github.com/paugier/nbabel/blob/master/cpp/main_arrays.cpp

See a5b7247

There is now in the README:

Note 6: The directory "cpp" also contains 2 faster C++ implementations (proposed by @bolverk and @isuruf) which run on my PC in 25 s, 104 s and 7080 s for the AoS implementation by @bolverk and 26s, 104 s and 7330 s for the
SoA implementation by @isuruf. Note that there is a problem with the conservation of energy.

For comparison, for 16384 particles, the sequential Python implementation using Pythran runs here in 7220 s.

@paugier paugier closed this Apr 29, 2021
@isuruf

isuruf commented Apr 29, 2021

Copy link
Copy Markdown
Contributor Author

Looks like my implementation is not an SoA either. Needs more work to make it SoA.

@paugier

paugier commented Apr 29, 2021

Copy link
Copy Markdown
Owner

Ah... How do see that it is not "SoA" ?

If you try to do that, you can work in https://github.com/paugier/nbabel/blob/master/cpp/main_arrays.cpp and also look at the problem with energy conservation. You can compare the results of the 3 C++ implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants