Hash.h 598 B

123456789101112131415161718192021222324
  1. // Copyright (C) 2009-2015, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include "anki/util/StdTypes.h"
  6. namespace anki {
  7. /// @addtogroup util_other
  8. /// @{
  9. /// Computes a hash of a buffer.
  10. /// This function implements the MurmurHash2 algorithm by Austin Appleby.
  11. /// @param[in] buffer The buffer to hash.
  12. /// @param bufferSize The size of the buffer.
  13. /// @param seed A unique seed.
  14. /// @return The hash.
  15. U64 computeHash(const void* buffer, U32 bufferSize, U64 seed = 123);
  16. /// @}
  17. } // end namespace anki