Hash.h 612 B

1234567891011121314151617181920212223242526
  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. #pragma once
  6. #include "anki/util/StdTypes.h"
  7. namespace anki {
  8. /// @addtogroup util_other
  9. /// @{
  10. /// Computes a hash of a buffer.
  11. /// This function implements the MurmurHash2 algorithm by Austin Appleby.
  12. /// @param[in] buffer The buffer to hash.
  13. /// @param bufferSize The size of the buffer.
  14. /// @param seed A unique seed.
  15. /// @return The hash.
  16. U64 computeHash(const void* buffer, U32 bufferSize, U64 seed = 123);
  17. /// @}
  18. } // end namespace anki