diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-14 13:00:10 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-14 13:00:26 +0300 |
commit | 64c0c13e6e08c51e92504631468db864f553d9b5 (patch) | |
tree | 5903262689a45defda7a98782656964bdaa50f6b /source/blender/blenlib/CMakeLists.txt | |
parent | c8a9764987a8c1e7ea0093e8a0b028a65af6ee33 (diff) |
Add Murmur2A hashing feature to BLI
Murmur2a is a very fast hashing function generation int32 hashes.
It also features a very good distribution of generated hashes.
However, it is not endianness-agnostic, meaning it will usually generate
different hashes for a same key on big- and little-endian architectures.
Consequently, **it shall not be used to generate persistent hashes**
(never store them in .blend file e.g.).
This implementation supports incremental hashing, and is a direct
adaptation of reference implementation (in c++):
https://smhasher.googlecode.com/svn-history/r130/trunk/MurmurHash2.cpp
That cpp code was also used to generate reference values in gtests file.
Reviewers: sergey, campbellbarton
Reviewed By: campbellbarton
Projects: #bf_blender
Differential Revision: https://developer.blender.org/D892
Diffstat (limited to 'source/blender/blenlib/CMakeLists.txt')
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 9efa20da13e..ba166b11960 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -65,6 +65,8 @@ set(SRC intern/freetypefont.c intern/graph.c intern/gsqueue.c + intern/hash_md5.c + intern/hash_mm2a.c intern/jitter.c intern/lasso.c intern/listbase.c @@ -80,7 +82,6 @@ set(SRC intern/math_rotation.c intern/math_vector.c intern/math_vector_inline.c - intern/md5.c intern/noise.c intern/path_util.c intern/polyfill2d.c @@ -134,6 +135,8 @@ set(SRC BLI_ghash.h BLI_graph.h BLI_gsqueue.h + BLI_hash_md5.h + BLI_hash_mm2a.h BLI_heap.h BLI_jitter.h BLI_kdopbvh.h @@ -153,7 +156,6 @@ set(SRC BLI_math_matrix.h BLI_math_rotation.h BLI_math_vector.h - BLI_md5.h BLI_memarena.h BLI_mempool.h BLI_noise.h |