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

Use double instead of floats for positions/velocities? #34

Closed
Luthaf opened this issue Jun 30, 2016 · 2 comments
Closed

Use double instead of floats for positions/velocities? #34

Luthaf opened this issue Jun 30, 2016 · 2 comments

Comments

@Luthaf
Copy link
Member

Luthaf commented Jun 30, 2016

This uses more memory, but have multiple advantages:

  • Better support for simulations codes, with no double -> float conversion needed;
  • Support for restart-style files, like the restart convention for NetCDF.
@maxlevesque
Copy link
Contributor

You sure of that move? Seems to me there's a big move toward so-called single precision these days. Look at gromacs for instance. This tendency is driven by the GPU and MIC world where vectorization is so important.

@Luthaf
Copy link
Member Author

Luthaf commented Jul 1, 2016

I am not sure, that is why there is the discussion label ;-). What bug me with single precision is that Chemfiles will never support any format with double precisions.

Another possibility would be to somehow dynamically switch precision as needed, but this would make the library API a nightmare. Or have different single/double compilation mode, like FFTW3, but then we get ABI incompatibilities.

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

No branches or pull requests

2 participants