Hash.h 611 B

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