Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nbody example improved #241

Merged
merged 2 commits into from
Aug 20, 2014
Merged

Nbody example improved #241

merged 2 commits into from
Aug 20, 2014

Conversation

f-koehler
Copy link
Contributor

The Nbody example has been improved as follows:

  • command line options for both particle number and step width
  • removed unused variables
  • data is aligned using float4 (also I do not see a big performance improvement)

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling f91a562 on f-koehler:nbody into 417a50e on kylelutz:develop.

r.x = 0.0f;
r.y = 0.0f;
r.z = 0.0f;
r.w = 0.0f;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these lines could be replaced with float4 r = (float4)(0, 0, 0, 0);

kylelutz added a commit that referenced this pull request Aug 20, 2014
@kylelutz kylelutz merged commit 406c38b into boostorg:develop Aug 20, 2014
@kylelutz
Copy link
Collaborator

Looks good!

I also left a few notes. Thanks for updating this!

@kylelutz
Copy link
Collaborator

Another thing to look into is using the Boost.Compute random number generators to initialize the positions on the GPU instead of generating them on the CPU and then transferring them.

@f-koehler
Copy link
Contributor Author

The things you mentioned where mainly features of Boost.Compute that I was not aware of yet. I'll have a look at it.

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.

3 participants