Replacing std::hash
to ensure portability of interpolation files
#174
Labels
std::hash
to ensure portability of interpolation files
#174
PROPOSAL uses
std::hash
to calculate hashes. However, the implementation of std::hash is different for clang and gcc (and therefore the resulting hashes are different). This causes the names of the interpolation table files to differ on different operating systems, e.g. they are not really portable.From the documentation of
std::hash
:It should be more than enough to use something like
sha512
, I found stbrumme/hash-library as one set of implementations of hashing algorithms.Hashing std::string (for names) is of course straight forward, but I probably need to think more about a good way to hash integers and especially floating-points numbers (e.g. for the particle masses).
The text was updated successfully, but these errors were encountered: